if (-e $filepath) { # the file exists if (-M $filepath > $maxage_days) { my $exception = { table => $tablename, exception => 'outofdate', data => { file => $filepath, age => sprintf("%.2f", (-M $filepath)*24) . ' hours', still_copying => 0 } return ($exception); }; else { my $exception = { table => $tablename, exception => 'nonexistent', data => { file => $filepath, age => 0, nonexistent => 1 } }; return ($exception); }