Exactly, that's why I mentioned stale values of $! and set it to undef in the scriptified version of the second paragraph.
It would have been better to do that right before exiting the scope of $fh. EAGAIN is sometimes possible during normal I/O.
After Compline,
Zaxo
In reply to Re^2: You *Can* Catch errors in closing lexical filehandles
by Zaxo
in thread Catching errors in closing lexical filehandles
by gaal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |