in reply to Perl - unix process

You do not seem to appreciate how processes work - if I am wrong them please forgive me, like other monks I am having difficulty in understanding the issue.

When you use system or `backticks` you will create a new process. That process effectively has a "firewall" around it preventing other processes from accessing anything inside. So if you set an array in one process it cannot normally be seen by another. To get around that there are features called IPC - InterProcess Communication. The simplest IPC mechanism is to use a pipe, which you are probably familiar with in ls|more. More complex mechanisms, like message queues and shared memory require synchronisation and locking, and you probably don't want to go there.

What I can't figure out is why you are running separate processes at all, in fact the "code" you supplied (which is basically a bunch of comments) does not create a process. As others have said, placing other subroutines in modules, then loading these modules using use or require is the normal way of doing things.

So, the question is, are these different programs which have to run, or just subroutines that can run in the same process?

Update: I missed the call to system when I looked at your "code" - hardly surprising the way you formatted it. Basically you cannot pass a Perl array back and forth between processes in a simple manner: data is not shared automagically, you have to use an IPC mechanism, a database, or a file. Better yet - don't use separate programs.