http://qs321.pair.com?node_id=1230185


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

I think you mean:

if (-M $file > -2)

In other words, -1.15 is less than -1, not greater than ;)

Either way, it would be nice to find out exactly what's happening here. I'll play around later. If you happen to find anything, post back please.

  • Comment on Re^2: Intermittent bug in module: File not getting deleted as expected
  • Download Code

Replies are listed 'Best First'.
Re^3: Intermittent bug in module: File not getting deleted as expected
by nysus (Parson) on Feb 19, 2019 at 19:11 UTC

    I think we have the answer for this behavior. See the comment further down and this. It seems that the time the script starts is factored into the age of the file. Still trying to wrap my head around it, though. Seems weird.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

Re^3: Intermittent bug in module: File not getting deleted as expected
by nysus (Parson) on Feb 19, 2019 at 18:54 UTC

    Well, it's to the power of 10^-5, so -.000015.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

      Ahhh, of course. I overlooked that part of your number :)