Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Re: How do I use stat

by ducky (Scribe)
on Sep 28, 2001 at 00:05 UTC ( [id://115233]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: How do I use stat
in thread How do I use stat

No problem! That is exactly why we're here =)

One thing to consider when doing stat is that it operates off of the current working directory. Perhaps $_ isn't really pointing to a valid file? Proper error checking is very good practice and often needs very little extra modification:

die "Bigger problem: '$_' doesn't exist!" if not -e $_ ; if ( time - (stat $_)[9] > 1200 ) { print "ERROR MESSAGE" }
Oh, and no, stat works just fine by its lonesome. No prep is needed.

-Ducky

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-18 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found