in reply to
Script to find and delete files
I would do something like this:
my $time_zone = DateTime::TimeZone->new(name => 'local');
my $a_year_ago = DateTime->now(time_zone => $time_zone)->subtract(year
+s => 1);
->mtime('<' . $a_year_ago->epoch)
### Your logic.