in reply to Variable scoping problem
The second time you try to require "a.pl"; has no effect because a.pl is already loaded. To ensure the other scripts are always executed by c.pl, use do instead of require.
do "a.pl"; print "$database\n"; do "b.pl"; print "$database\n"; do "a.pl"; print "$database\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Variable scoping problem
by haukex (Archbishop) on Nov 25, 2019 at 22:50 UTC | |
by kwatts59 (Novice) on Dec 04, 2019 at 14:45 UTC |