ok so im reading from lincoln d stein book
network programming in perl
chapter 5 shows an example of a tcp echo server-client app.
im on ubuntu.
im tryin to test it.
here are the sources to it
http://www.modperl.com/perl_networking/source/ch5/
its expected behaviour is simple

client-->message-->server
server gets message,inverts it-->new_message-->client
client prints message on screen


ok now if i try the application with appropriate parameters
for client 127.0.0.1 and 2007 and for server with
2007 it doesnt want to work.i put in input...but it
never seems to come back on the screen inverted.
on the other hand if i replace the client with
telnet and give it same params ,SURPRISE !IT WORKS !!
now in chapter 4 there's an exact replica of this
server-client app only its using somewhat different
functions and that works totally OK.
my question is whats happening and how am i supposed
to get it right ?
thank you


In reply to socket gone crazy by spx2

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.