in reply to more forking troubles

I think you want to call exit 0; in the child block when the child has done it's work. Alternatively, this may be a case where exec("sleep.pl"); is useful.

As it is, I think the kids will keep piling up, each wanting to act as a new server on the same connection.

After Compline,
Zaxo