Quoth (e-mail address removed):
...and you'll likely want File::Find to do the searching.
OTOH, you could probably do this more easily with find(1).
I thought about find(1), but it finds all the files that match
the expression you give it. I don't know how to tell it to
output just the newest, or the biggest, of the anythingest for
that matter.
My first guess would be something like:
my $the_winner;
{
my $the_winners_ctime;
for (get_the_directory_paths()) {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks) = stat;
if (!defined $the_winner or $the_winners_ctime < $ctime) {
$the_winner = $_;
$the_winners_ctime = $ctime;
}
}
}
print "$the_winner\n";
But ctime gets set by write(2) so the whole thing is pointless...