in reply to Sharing a variable across multiple files
The problem is that with system("perl 2.pl"); you call a new instance of perl, which has no shared memory with the one that calls it. Those are two different processes.
What you probably want to do is do "2.pl", this way 2.pl will be run in the same context as 1.pl . Look do's documentation for information on that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sharing a variable across multiple files
by bihuboliya (Acolyte) on Aug 07, 2013 at 10:56 UTC | |
by bihuboliya (Acolyte) on Aug 07, 2013 at 12:28 UTC |