Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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
Replies are listed 'Best First'.
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 cooling their heels in the Monastery: (11)
As of 2015-07-08 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls