Don't forget good ol' glob.
#!/usr/bin/perl -w use strict; my ($age, $file) = (0, ''); for (<*BOT*>) { if (-M > $age) { $age = -M; $file = $_ } } print "$file\n";
In reply to Re: Finding Oldest File in a Directory
by Zed_Lopez
in thread Finding Oldest File in a Directory
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |