Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Answer: How do I get the last accessed time for directory?

by btrott (Parson)
on Apr 06, 2000 at 11:20 UTC ( #7013=categorized answer: print w/replies, xml ) Need Help??

Q&A > directories > How do I get the last accessed time for directory? - Answer contributed by btrott

With stat:
my $atime = (stat "foo_dir")[8];
Or, if you'd like a nicer interface to stat, use File::stat:
use File::stat; my $stat = stat "foo_dir"; my $atime = $stat->atime;
Either of those will put the last accessed time, in epoch seconds, into $atime.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2016-08-30 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (418 votes). Check out past polls.