in reply to Socket TCP

Code that does a "use Socket" is working at the wrong level.
use IO::Socket; my $sock = IO::Socket::INET->new("127.0.0.1:7000") or die "Cannot conn +ect: $!"; print "connected. enter command: "; my $cmd = <STDIN>; print $sock $cmd; while (<$sock>) { print; }
Far simpler. Far easier to read. Far fewer magic constants.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.