in reply to how to run a specific file from a list of filenames in a folder

To pull a particular item to the front, you can use something like this:
my $first = 'run_this_first'; # or whatever @filenames = sort { ($b eq $first) cmp ($a eq $first) || -M $b <=> -M $a } @filenames;
Or maybe something like this:
my %modtimes; $modtimes{$_} = -M $_ foreach @filenames; $modtimes{$first} = 1e99; @filenames = sort { $modtimes{$b} <=> $modtimes{$a} } @filenames;
Whatever floats your boat.