ybiC has you covered, and i recommend Proc::Daemon,
but if you really want to get a
full understanding on daemons and servers (forking,
pre-forking, pre-threaded, etc.) then get thee a copy
of Network Programming with Perl.
You will not regret it. ;)