in reply to Reading from a UNIX daemon

You can run your daemon as a service under something like xinetd, or more preferably, using tcpserver. Either way, these tend to remap STDIN and STDOUT to a socket for you, saving the hassle of writing your own stand-alone server.

If you really do need a server, though, because it has to persist, look in to IO::Socket and IO::Select which can provide a solid framework for implementing something fairly robust.

I'd try to explain how to write a client/server application here, but there's a plethora of examples in many of the O'Reilly books on Perl.