- or download this
my $oldest;
my $oldtime = 0;
...
($oldest, $oldtime) = ($_, $thistime);
}
}
- or download this
use List::Util 'reduce';
my $file = (reduce {$a->[0] < $b->[0] ? $a : $b}
map {[(stat)[10],$_]}
glob '*.pl'
)->[1];
- or download this
my $file = reduce {(stat $a)[10] < (stat $b)[10] ? $a : $b}
glob '*.pl';