Well I downloaded your code and tried to run it. When the server starts it gives an errror:
Useless use of a variable in void context at ./threaded-chat-server li +ne 120. Useless use of a variable in void context at ./threaded-chat-server li +ne 120. Which is: %E = ( map { $1 => $2; /(.+):(.+)/ } ( split /;/, $Elm ) );

I see there are alot of warnings when trying to print to clients, about unitialized values. I tried connecting 3 clients. The server reported the 3 connections, but when I sent something from the clients, it was not printed unless I hit enter twice, but that's minor. More serious: there was no chat-echo back to any client, but the line feeds were echoed if I hit enter repeatedly. So there is a connection and this is promising. So this thing is far from ready to go. If I manage to get it working over the holidays, I'll post it as a snippet. I did observe the problem you are talking about. I start 3 clients and send some messages, Then I kill all clients and then restart them. If I send from client 2 or 3, all goes well; but as soon as I try to send from client1, the whole thing just crashes taking all clients with it. I tried one of these threaded servers before, and didn't get as far as you did, so it looks hopeful. Thanks for posting your code.


In reply to Re: thread:shared by zentara
in thread thread:shared by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.