in reply to Re^3: Sorting files by 3 numbers in the name
in thread Sorting files by 3 numbers in the name
Untested, but this should pad your numbers with leading zeros, just in case the numbers don't turn out to be fixed length.
my @sorted_files = sort_by { sprintf( '%012d' x 4, (split /_/, $_)[1,7 +,8,9]) } @files;
|
|---|