Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: "Impossible" socket error return

by ikegami (Pope)
on Sep 27, 2011 at 23:36 UTC ( #928204=note: print w/ replies, xml ) Need Help??


in reply to "Impossible" socket error return

How can it get undef back, without $! being set?

readline (for which <$fh> is a shortcut) returns undef on end of file as well as on error.

By the way, there's no way to know if $! is meaningful after readline because readline has no way of signaling an error occurred.


Comment on Re: "Impossible" socket error return
Select or Download Code
Re^2: "Impossible" socket error return
by dd-b (Monk) on Sep 28, 2011 at 14:55 UTC
    Thanks! Yes, it was indeed the obvious. Bug in another bit entirely was causing it to disconnect at an inopportune moment.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-09-03 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls