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"; };