With open(FH,"....|") perl in fact does not open a file, but a pipe to a newly created process.
When this process exits, it stays as a zombie as long as parent process does not collects its exit staus.
In C this is done by calling
wait() or
waitpid() function. Perl gives you
an abstraction for accessing processed as files, but the final collection of child's exit status
must be done anyway and it is done in the
close function.
There is no direct or easy way of mod_perl doing this for you
(except for some playing with SIGCHLD handler, but there you will be a subject to filehandle leakage as well).
So just call close when it is appropriate.
To allway call close on everything that was open is
a good practice in any environment not only in mod_perl. But as mod_perl processes are long-running, this
bad practice pops up as a problem.