Avoid external programs Rather than worry about how external program interaction works, it's best to avoid it entirely. # Why use /bin/rm, when perl already has # that ability built in? unlink <*>; or better yet # Do them one at a time, so we can show failures. for ( <*> ) { unlink $_ or print "Unable to unlink $_\n" }