my @h = map -s, @files; @results = @files[sort {$h[$a]<=>$h[$b]} 0..@h-1];