in reply to how to run a specific file from a list of filenames in a folder
Or maybe something like this:my $first = 'run_this_first'; # or whatever @filenames = sort { ($b eq $first) cmp ($a eq $first) || -M $b <=> -M $a } @filenames;
Whatever floats your boat.my %modtimes; $modtimes{$_} = -M $_ foreach @filenames; $modtimes{$first} = 1e99; @filenames = sort { $modtimes{$b} <=> $modtimes{$a} } @filenames;
|
|---|