- or download this
my @sorted_files
= map {$_->[0]}
sort {$b->[1] <=> $a->[1] or $a->[0] cmp $b->[0]}
map {[$_, -s]} @files;
- or download this
my @sorted_files = sort {-s $b <=> -s $a or $a cmp $b} @files;
- or download this
sorted_files = files.sort_by {|f| [- test(?s, f), f]};