in reply to Socket Questions

Please edit your post and put code tags around the code.

It seems like you are expecting data from stdin, but you never actually read anything. You reference a variable ($send_data) that is never set (the only set is commented out).

The connection stays open but I can't anymore than the first line.
What exactly does it do? Hang? If so, where?

fnord