You can't do this in the way you want. Odds are that you either want to fork or else use a module like Storable to stringify your data structure, write it to a file, then read that at the other end.
Another option worth considering is that you could write the data structure to an external file for persistent storage. If you're interested in that, you may find DBD::Deep useful.
Comment on Re: Passing array pointer through script input