in reply to Re: IO::Socket server->client
in thread IO::Socket server->client

What you are describing is exactly what inetd/xinetd is designed for http://linux.die.net/man/8/xinetd. Of course, if you are just trying socket code out, there are numerous tutorials/examples here at the monastery.