Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: Something like File::Find with sorting

by Anonymous Monk
on Feb 16, 2013 at 18:47 UTC ( #1019057=note: print w/replies, xml ) Need Help??

in reply to Re: Something like File::Find with sorting
in thread Something like File::Find with sorting

Or if you want a per-directory view,

my @files; sub search { push @files, $_ if -f; } sub handle_directory { @files = sort { lc($a) cmp lc($b) } @files; # do something with @files print "@files\n"; # get ready for the next directory undef @files; } File::Find::find( { wanted => \&search, bydepth => 1, postprocess => \&handle_directory }, $directory );

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019057]
[ambrus]: LanX: why would I read it? isn't it a book for managers? I don't want to be a manager.
[ambrus]: I don't quote it either.
[erix]: it's really a software book, albeit about experiences from the 60s-80s. People haven't changed all that much though.
[erix]: a software project book, is probably more exact
[ambrus]: Yes, but I'm not managing software teams either.
[ambrus]: I'm not only not a restaurant manager, but also not a software manager.
[erix]: Peter's principle says it' sonly a matter of time ;)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2017-09-22 13:57 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (264 votes). Check out past polls.