I followed a previous discussion and as a result read perlipc. There is a part of my requirement that doesn't seem to be covered there. I have 150000 jobs defined in a language called jil in a single file that I want to load individually through a utility. Some of the jobs will have syntax errors and some will fail but could succeed on retry. So I wrote a parser in OO-Perl that gets an individual job from the file. Now I am designing a method called spawn_jil which should create a subprocess e.g. with fork or open to load the jobs in parallel; but if a certain number of subprocesses have not yet exited it has to wait until less than that number of subprocesses are still alive. So my thought processes went something like: suppose the parent creates a filehandle for the child to communicate back (use Filehandle) before spawning. It puts it in a hash and after iterating through the parser it has to destroy filehandles for exited subprocesses. I don't see a method for that in the Filehandle package. The child can't create the filehandle because the parent then won't have access to it. I can't use the database because the overhead would defeat the whole purpose. Ideally I'd like to avoid communicating via a storable. Any ideas?
Thanks