in reply to Myth busted: Shell isn't always faster than Perl

I think you'd better do
sub { -f _ or return; unlink $_;
You really only want to unlink "regular" files; and this makes the comparison apples-and-apples with the shell version.

Also, explicitly testing '.' and '..' is superfluous, because they'd be caught by -d.

We're building the house of the future together.

Replies are listed 'Best First'.
Re^2: Myth busted: Shell isn't always faster than Perl
by VSarkiss (Monsignor) on Dec 30, 2005 at 18:42 UTC

      Yes, my reply originally looked like that; but as the OP said, you may want to do additional things, such as reporting.

      We're building the house of the future together.