develooper Front page | perl.perl5.porters | Postings from September 2000

File::Find feature request

Thread Next
Rich Morin
September 13, 2000 19:38
File::Find feature request
Message ID:
I would like find (and perhaps finddepth) in File::Find to
walk directories in sorted, rather than "accidental" order.

It looks to me as if this could be accomplished by changing
two lines of code (one in each routine), as follows:

     my(@filenames) = readdir(DIR);
     my(@filenames) = sort(readdir(DIR));

I think that the performance hit would be negligible in most
cases and that the benefit (trees get walked in a "reasonable"
order) would be worth the cost.  If the Powers That Be don't
agree, however, I suppose alternative versions (sfind[depth]?)
could be tacked into the module.

Side Note:  I went to "The Perl 5 Module List" to find out who
is in charge of File::Find.  The "Info" link reads "P5P", but
its use results in an error: "CPAN id 'P5P' not found".  Tsk.

Rich Morin:, +1 650-873-7841,
Prime Time Freeware:, +1 408-433-9662,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About