in reply to perl socket

socket(SOCK,PF_INET,SOCK_STREAM,IPPROTO_TCP) or die " cant make socket + : $!" or die "cant connect : $!";
Looks like you forgot to actually connect()?

(For most practical applications, IO::Socket::INET is probably going to be easier to use. Of course if you're learning TCP/IP you may want to start with the low-level stuff anyway.)