And then in your main file:package Variables; use strict; use warnings; our $foo = 'Foo'; our $bar = 'Bar'; 1;
use Variables; use strict; use warnings; print $Variables::foo;
In reply to Re: Avoiding Globals with OO Perl
by ~~David~~
in thread Avoiding Globals with OO Perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |