in reply to Forks and IPC

When forking, parent and child do not share any memory - the child is a copy of the parent. You cannot pass information back to the parent by just modifying variables. If you want to do this using variables, you may want to explore the world of threads. Otherwise, with forks, you're better off using pipes - then you can pass any (serialized) data you want.

You may want to read the perlipc manual page.