for(<*.*>){ if(unlink $_){ print $_," deletedt\n"; } else{ print "can't delete ",$_,"\n"; } }