# unlink returns the number of files it successfully deleted $cnt = unlink 'a', 'b', 'c'; if (unlink @goners == @goners){ print "I deleted 'em all! HaHaHa\n"; } unlink <*.bak>; unlink $filename or die "Couldn't delete $filename: $!";