Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Finding Oldest File in a Directory

by Zed_Lopez (Chaplain)
on Oct 04, 2005 at 21:47 UTC ( #497420=note: print w/replies, xml ) Need Help??


in reply to Finding Oldest File in a Directory

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";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://497420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2023-06-08 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?