This is quick and dirty:
# 1/72 is 20 minutes as a fraction of a day if (-M '/tmp/file' > (1/72)) { # do stuff }
-M returns the age in days of the file, but relative to the time that your program started. Therefore this works if your program is pretty fast and you're not too fussed about the accuracy of the 20 minutes. If that's not true then you'll also need to throw the value of $^T into the equation.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Timestamp conditional
by davorg
in thread Timestamp conditional
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |