Hello dear Monks )) I have simple code with File::Find:
use strict;
use File::Find;
my $dir = "/some/dir/in/linux";
File::Find::find (\&search, $dir);
sub search {
if (-f $_) {
print "$_\n";
}
}
So if I have 1b.xml,1B.xml,67.xml,5a.xml it would give me the following output:
5a.xml
1b.xml
67.xml
1B.xml
How can I do something similar, BUT so that files that have equal lc($_) would be placed next to each other? Like that:
1b.xml
1B.xml
5a.xml
67.xml
or so? Thanks in advance. If my question is not clear - please let me know.