in reply to Messin around with fork() and fd's

There is commented code for daemonizing a process at Re: Daemons???. It can be wrapped in sub possess {...} and set up to take arguments. Syntax might be:

possess ( LOG => "/the/log/file", INP => [], # aryref to input handles OUT => [], # output handles FAT => [], # close these handles ENV => { PATH => ":" }, SIG => { }, # signal handlers hashref );

After Compline,
Zaxo