Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2015-11-28 22:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls