use strict; use warnings; use File::Find; my @finds=('D:/goodies/pdhuck/down1/perl/monks/winsorts'); my @fns=(); my $sub_want_info2 =sub { push @fns,$File::Find::name if -f $File::Find::name; }; find({wanted=>$sub_want_info2,no_chdir=>1}, @finds); use Encode qw/encode decode from_to/; ##http://code.activestate.com/lists/activeperl/21182/ ##https://gist.github.com/whitebell/5692575 my %fnt; for my $fn (@fns) {$fnt{encode('UTF-16LE', decode('UTF-8', $fn))}=$fn;} use Win32::API; my $f = Win32::API->new("shlwapi.dll", "StrCmpLogicalW", "PP","I"); my @fnts=sort { $f->Call($a, $b) } keys %fnt; @fns=(); for my $fntt (@fnts){ push @fns,$fnt{$fntt};} for my $fn (@fns){ print $fn."\n";}