The -M filetest operator gives the number of days since modification since startup of the script, so:
my $age = -M $file; if ($age < 7) { # do something } # or directly if (-M $file < 7) { # do something }
-- Hofmator
In reply to Re: Re: Re: Checking file Mod date
by Hofmator
in thread Checking file Mod date
by LostS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |