What this does, of course, is that Perl tells me that $global_variables 1-3 in the file lib.pl need an explicit package name and compilation fails.
It fails for me in a completely different way. Even if I use the Switch module. Which takes a scalar as an argument not a subroutine.
Which version of perl are you using?
But the answer to one of your questions is to use our instead of my.
In reply to Re: What to use instead of global variables
by Cody Fendant
in thread What to use instead of global variables
by tunafish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |