Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: You *Can* Catch errors in closing lexical filehandles

by Zaxo (Archbishop)
on Sep 27, 2004 at 22:53 UTC ( [id://394387]=note: print w/replies, xml ) Need Help??


in reply to •Re: You *Can* Catch errors in closing lexical filehandles
in thread Catching errors in closing lexical filehandles

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

  • Comment on Re^2: You *Can* Catch errors in closing lexical filehandles

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://394387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-06-15 16:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.