in reply to Getting latest modified file in a directory
Variation on the above theme for an instance if you actually wanted all of the files ordered newest to oldest and not just the newest:
my @files_by_age = map { $_->[1] } sort { $b->[0]<=>$a->[0] } map { [ $_->stat->mtime, $_ ] } grep { $_->is_file } path( q{/tmp} )->children();
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|