in reply to Re: Detecting write errors (disk full, bad media)
in thread Detecting write errors (disk full, bad media)

But who in the world checks the return value of print? Nobody, I guess, unless autodie handles it, if it can...

I think a safer bet is to explicitly close the output filehandle and check its return value. Or, again, rely on autodie.

  • Comment on Re^2: Detecting write errors (disk full, bad media)

Replies are listed 'Best First'.
Re^3: Detecting write errors (disk full, bad media)
by oxone (Friar) on Jul 03, 2011 at 09:16 UTC
    Re. >>who in the world checks the return value of print?<< ... for the record, I do, IF it's writing a file likely to get very large. I didn't used to, then lost several hours of my life debugging strange behaviour in a production script which had worked fine for many months. The cause was a full disk, but the relevant print statements failed silently (even using strict and warnings) and the script happily ran to completion.