in reply to global module variable are imported copies?
How exactly is first.pl calling second.pl? There are several ways this can be accomplished. If you're using system(), exec(), qx() or backticks, then they've got no chance of sharing variables. (Not the way you're doing it anyway.) With do "second.pl" you'll fare better.
But really, I believe you should rethink your approach to structuring your code. Generally speaking a single process should be a single ".pl" file; ideally only a few lines long. The bulk of code should be organised into reusable modules.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: global module variable are imported copies?
by perlnub (Initiate) on Sep 18, 2012 at 07:18 UTC | |
by kennethk (Abbot) on Sep 18, 2012 at 15:30 UTC |