in reply to Re: Destructors and global variables
in thread Destructors and global variables
The variables n_DT and r_DT are arrays of objects which I want to use/share between the two scripts.
Again with variables in files.
So I could possibly read the files again to create my list, but I was wondering if there was another, more efficient, way of doing this.
You want to share between two processes, perhaps?
Actually, sounds more like passing for one process to another rather than sharing.
Unless the second process is a fork of the first, you have to somehow convert the array to a string of bytes to pass it from one process to another. You do have choices as to how to convert the array to bytes (Storable, JSON, etc) and how you actually pass it (file, pipe, socket, etc), but efficiency is not going to be the deciding factor.
|
|---|