in reply to Re^2: Sorting based on filesize.
in thread Sorting based on filesize.
my @sorted = map substr($_, 4) => sort map pack(`L',$_) . $_ => @files;
For improved portability, that pack('L',$_) above should read pack('N',$_) because 'L' is native while 'N' is network (big-endian). See also Re: Advanced Sorting - GRT - Guttman Rosler Transform.
|
|---|