print "$_\n" for sort { my ($ad, $bd) = map /(\d+)/, ($a, $b); $ad <=> $bd } @files;