in reply to Re: Re: How does find() build its tree.
in thread How does find() build its tree.

See the preprocess argument -- if you pass a code reference, it'll apply it to the list returned by readdir before calling your wanted coderef. Something like this, perhaps:
find({ wanted => \&wanted, preprocess => sub { sort { -M $a <=> -M $b } @_; }, }, '.');

Replies are listed 'Best First'.
Re: Re: Re: Re: How does find() build its tree.
by Ras (Acolyte) on Jan 29, 2002 at 00:54 UTC
    Just to let you juys know, I think find returns the
    files in the order of 'ls -f'. Unless someone knows
    something else. Thanks for all your help.