This can be irrelevant to your current problems but can save you on future problems: -M $filepath can return a negative age too! : -M Script start time minus file modification time, in days. (see -X).
Secondly, you are creating "exception" being some kind of hash with a key also called "exception" and then in your last code you compare $exception as a string. I would doublecheck that this $exception is indeed $exception->{'exception'} and not the original hash exception.
Thirdly and most importantly, the first chunk of code you showed has an if-statement which the first branch returns nothing. So your "age" exceptions are not returned. The second branch does return an exception HASH though.
Perhaps, place my $exception; after if( -e $filepath), then go through all your exception if-checks, remove all other my $exception... and finally return $exception only if it is defined. To achieve a state of lift-off you need to insert two more closing curly brackets.
In reply to Re: Origin of 'md5sum' and 'sh' logs
by bliako
in thread Origin of 'md5sum' and 'sh' logs
by drw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |