How are you creating these parallel programs?
fork()? There's a variety of ways you can go about creating these parallel functions, including threads, but each have their own mechanism for inter-process communication.
You might have to read up on
perlipc.