in reply to Re: Re: file::find and ordered output
in thread file::find and ordered output
How can it affect the order of the directory processing?Its effect is that it changes what is passed to the wanted() coderef e.g
This will sort the directory listing that process_array() gets in reverse alphabetic order. So basically the preprocess option allows you to change what the wanted() function receives from changing it's order to removing unwanted directory entries.find({ preprocess => sub { return sort { $b cmp $a } @_ }, wanted => \&process_array, }, @ARGV);
_________
broquaint
update: changed <=> to cmp in the sort() (thanks ariels)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: file::find and ordered output
by Bjoern (Novice) on May 13, 2002 at 11:34 UTC | |
|
Re: Re: Re: Re: file::find and ordered output
by Bjoern (Novice) on May 13, 2002 at 10:41 UTC |