To explain, the answers above keep the two "scripts" in the same process, and that is required in order to pass Perl objects. An object variable is only a reference with a little extra data (its class). The reference contains a memory address that only applies to the current process (assuming you are dealing with a virtual memory system like UNIX, Linux, or Windows). Passing an address as an argument would not work because that same memory address could be used for something else, or might be invalid. Might work on Windows 95, but I'm sure you are not that desperate.
You could do it other ways if you really need two processes. The simplest would be to pass the data rather than the reference, using any number of mechanisms, including
Data::Dumper. You could also use shared memory (
shmem), but that has other issues concerning synchronisation. You could use
fork, which creates a process (thread on Windows) as an almost identical copy of the original, right down to the memory addresses. It really depends
why you want to do this.