in reply to Re: Intermittent bug in module: File not getting deleted as expected
in thread Intermittent bug in module: File not getting deleted as expected
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 Section
Seekers of Perl Wisdom