Good catch on the unlink checking, I had completely overlooked that. In cleanup(), OP should be doing something like:
if (-M $file >= $age){ unlink $file or die "can't delete the damned file!: $!"; }
...even if your suggested "force" param is introduced.
In reply to Re^2: Intermittent bug in module: File not getting deleted as expected
by stevieb
in thread Intermittent bug in module: File not getting deleted as expected
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |