Here's a routine out of one of my modules
sub get_file_list
{
my ($dir) = @_;
my $logger = get_logger( "root.get_file_list" );
if (! opendir DIR, $dir )
{
$logger->error("Unable to open directory '$dir': $!");
return;
> What's a quick way to get the name of the newest file in a directory?
ls -ltr
and it'd be the last file listed (-ltr Long listing, by Time, in Reverse
order). I don't know of a way to make opendir/readdir use a different
order (by name, case sensitive as your OS) but a trick to get the las
Gurus,
What's a quick way to get the name of the newest file in a directory?
TIA,
Deane Rothenmaier
Systems Architect
Walgreens Corp.
847-914-5150
"In theory there is no difference between theory and practice. In practice
there is." -- Yogi Berra___