in reply to Listening on 2 Sockets

Use POE. Not only does it make the low-level task of listening to two sockets clean within one process, there's also a lot of high-level code to deal with being a TCP server.

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