Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
As far as I know, you can't [Added: There is a way, see my other reply below, You *Can* Catch errors in closing lexical filehandles]. Observe, prints '1', the result of printing to the filehandle. Placing an explicit close after the print statement gives something like, That uses the handy /dev/full device of linux, for which writes always fail with ENOSPC. The failure would have occurred on print if we had set $fh to autoflush or had printed more than a buffersworth of text. For careful error handling, you should close your lexical handles as if they didn't know how to do it for themselves. Update: gaal++ points out an error. Corrected. After Compline, In reply to Re: Catching errors in closing lexical filehandles
by Zaxo
|
|