suggestion for you, hoe about using xinetd (or inetd) to handle the server stuff. then your program only deal iwth stdio.
It also means you don't have thew server sitting and eating resources constantly. it will be started when its needed. (disadvantage: perl has to be started each time.) you could always have xinetd start your sever program and let that fork out individual instances as required, and colse itself after a set time of no connections.
for some basic details.