in reply to File Age in Seconds ? (need more handholding)

Simple answer: use stat($filename):
C:\Perl\bin>perl.exe -le "print(time - ( stat(q[perl.exe]) )[10])"

Replies are listed 'Best First'.
Re^2: File Age in Seconds ?
by blazar (Canon) on Dec 23, 2005 at 11:33 UTC

    Too bad: -M (see perldoc -f -X) does just that except that it's in days, not seconds. So one has to backconvert. Half-heartedly I think that maybe it may have been more convenient to stick with seconds, but I'm not really sure...

    Oh, and of course -M compares with script startup time, not time(), which may be a completely negligible difference or a very relevant one depending on the actual application!

    Well, it just to give the OP another option...