Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

( #7013=categorized answer: print w/ replies, xml ) Need Help??

Q&A > directories > How do I get the last accessed time for directory? 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 making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-06-28 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (355 votes). Check out past polls.