in reply to Help using perl for network programming

Well, the title of your post is the title of an excellent book by Lincoln Stein, and The Perl Cookbook also has some excellent snippets in that area (a good quickie reference for some of that sort of thing and other things).