It looks like
Proc::Daemon does most of the important stuff (though I haven't used it myself). Nowadays, I usually use
daemontools, which takes care of most of the hard parts, and provides a common interface to a wide variety of servers. You can also follow the instructions in the
Perl FAQ.