in reply to Handling server socket error and reconnect

Hopefully this is not your entire code, but if this is, what do you expect $client to be in your eval block for the first time? You have never created the connection, how can you read from or write to it ;-?

Update:

By the way, your program has syntax errors...

  • Comment on Re: Handling server socket error and reconnect

Replies are listed 'Best First'.
Re^2: Handling server socket error and reconnect
by johnnywang (Priest) on Nov 08, 2004 at 19:44 UTC
    Somehow copy/past doesn't work from emacs to netscape on Fedora for me. Updated the syntex error.

    when it starts, $client is undef, so the $@ block is called to establish the connection. I was hoping it will do the same thing if the connection is broken by the server.