in reply to Origin of 'md5sum' and 'sh' logs
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Origin of 'md5sum' and 'sh' logs
by drw (Novice) on Feb 26, 2019 at 19:11 UTC |