You may want to check out the documentation about the higher level socket routines, they can really make network programming easier. Check out Perl interprocess computing
(scroll down to the sockets section) They start off using the lower level stuff, then medium, and finally finish off with the high level stuff. Also GO Arena version 0.1a
(shameless plug), has a sample server and client code... granted there is alot of other stuff in there, but all the network oriented code for the server is at the bottom of the file and not spread out all over the place.