http://www.perlmonks.org?node_id=459704


in reply to Dates difference

You don't need to do the calculation yourself, see perldoc -f -X (or perlfunc):

if (-C $file > 45) { print "$file is too old.\n"; };

Replies are listed 'Best First'.
Re^2: Dates difference
by mikeraz (Friar) on May 24, 2005 at 17:46 UTC
    Bear in mind that for a long running script this solution will fail. The file test compares to start of script run time.