use constant ATIME => 9; use constant MTIME => 10; use constant CTIME => 11; my $dir = "\\\\Sn007a_srv\\c\$\\program files\\common files\\sysadmin\\log\\ApplicationSynchronizer"; my $time = CTIME; my @files = map{ scalar localtime($_->[$time]). "\t" . $_->[0]} sort{ $b->[$time] <=> $a->[$time] } map{ [ $_, stat($_) ] } grep { -f } glob ( "$dir\\*" ); print "$files[0]\n";