my @sorted_files = sort { -M $a <=> -M $b } @files;