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