for(map {$_->[0]} sort {$a->[1] <=> $b->[1]} map {[$_,m/fwlog\.(\d+)/]} @files){ print $_,"\n"; }