Dalin,
There was a recent contest on Webreference about UNIX daemons in Perl. The contest is HERE. The tutorial is HERE. The sources were made available somewhere on those URLs.
HTH
cheers,
zeitgheist
Comment on Re: Best way to make a script run persistently (daemon)