in reply to Re^4: Parallel::ForkManager problem
in thread Parallel::ForkManager problem

yes, as for any fork based solution, after the fork, changes on the child variables do not propagate to the parent because they live in different processes and memory is not shared.

My solution is only valid if all you need to pass is a single integer value. For other cases you can use threads, some kind of IPC or external storage to pass data between processes.

For instance, if what you want to share is a hash, you can use some of the DB modules to store the hash on disk and share it between all the processes, though you will need to use some module that handles concurrency properly or else do it yourself locking the shared file before accessing the on-disk hash.