in reply to Socket to Socket to Socket

There really should be a FAQ that says "Don't use <$sock>". It hangs until it sees a newline (or whatever you've put into $/) or until EOF (see shutdown or close) and is so very often the cause of "hanging" in socket code in Perl. Use read or sysread or recv instead.

Even if you expect that each request (or item that you want to read) will end with a newline, using <$sock> doesn't allow you to give reasonable error reporting when this expectation isn't met, and thus makes your code hard to troubleshoot.

I didn't look carefully at your code. I'll try to if this doesn't turn out to be the problem.

- tye        

Replies are listed 'Best First'.
Re^2: Socket to Socket to Socket (read)
by dsb (Chaplain) on Feb 27, 2006 at 17:43 UTC
    Tye,
    That was it. Thanks so much for taking the time to have a look. I really appreciate it.


    dsb
    This @ISA my( $cool ) %SIG