in reply to How to pass array as a reference from one perl file to other

In short, you don't. The array is in the memory of the first perl process, and the second one can't access it - the operating system is very protective about process memory spaces.

So you need some kind of serialization and deserialization, for example with JSON. You can convert the array to a JSON string, pass it to the second program, and there turn it back into a Perl array.

  • Comment on Re: How to pass array as a reference from one perl file to other