#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11140328 use warnings; use List::AllUtils qw( max_by ); my $latest = max_by { (stat)[9] } glob 'tmp*'; # or your file list print "latest = $latest\n";
In reply to Re: Getting latest modified file in a directory
by tybalt89
in thread Getting latest modified file in a directory
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |