in reply to Sending & Receiving on a socket

Your code locks up at this line $msg = <STDIN>; because <STDIN> waits until you type a return before continuing. Perl has no good way to just read one character from the keyboard. There are any number of ways around this problem, and they all suck to a greater or lesser degree.

Update: Oh yeah, and tyes answer too.

I almost always program non-blocking so I'd expect the program to hit the keyboard read before getting an answer from the server.

____________________
Jeremy
I didn't believe in evil until I dated it.