in reply to Checking file Mod date
-- Hofmator
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 } [download]