in reply to Re: forking: retaining variables after the child exits
in thread forking: retaining variables after the child exits

It sounds like the question comes from someone accustomed to an environment with threads, such as java. It might make sense to look at Thread.

One small trick I'd add to the comments about IPC is that one can use the Data::Dumper or other persistence modules to pass the datastructures you've built up over a pipe, or in a file.

  • Comment on Re: Re: forking: retaining variables after the child exits