in reply to Re: Re: file::spec and catfile?
in thread file::spec and catfile?
Here's one way to code your loop:
This is a rather verbose way, but you can see the correspondence to your code. Here's a one-line way to do it: unlink map {File::Spec->catfile($path, $_)} @arr;Warning: this will probably a touch off a round of golf ;-)foreach my $filename (@arr) { $x = File::Spec->catfile($path, $filename); unlink $x; }
HTH
|
|---|