Doctrin has asked for the wisdom of the Perl Monks concerning the following question:
Hello dear Monks )) I have simple code with File::Find:
So if I have 1b.xml,1B.xml,67.xml,5a.xml it would give me the following output:use strict; use File::Find; my $dir = "/some/dir/in/linux"; File::Find::find (\&search, $dir); sub search { if (-f $_) { print "$_\n"; } }
How can I do something similar, BUT so that files that have equal lc($_) would be placed next to each other? Like that:5a.xml 1b.xml 67.xml 1B.xml
or so? Thanks in advance. If my question is not clear - please let me know.1b.xml 1B.xml 5a.xml 67.xml
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Something like File::Find with sorting
by moritz (Cardinal) on Feb 16, 2013 at 17:40 UTC | |
by Anonymous Monk on Feb 16, 2013 at 18:47 UTC | |
Re: Something like File::Find with sorting
by Kenosis (Priest) on Feb 16, 2013 at 21:43 UTC | |
Re: Something like File::Find with sorting
by clueless newbie (Curate) on Feb 16, 2013 at 18:47 UTC | |
Re: Something like File::Find with sorting
by RichardK (Parson) on Feb 16, 2013 at 17:46 UTC |
Back to
Seekers of Perl Wisdom