Because forks are separate processes (as opposed to threads), they cannot access each other's variables, so you will need some scheme to communicate between them.
The most appropriate communication scheme depends on how you want to use the data. It may involve opening pipes to communicate between the processes (see IPC::Open2) or access to shared memory space (eg IPC::MMap), or maybe communicating via a file or database, or even signals.
Note, I haven't used any of these modules, so your milage may vary. But search CPAN for IPC, and read perlipc for ideas.
Clint