my @files_by_age = map { $_->[1] } sort { $b->[0]<=>$a->[0] } map { [ $_->stat->mtime, $_ ] } grep { $_->is_file } path( q{/tmp} )->children();