Is there a way to make variables superglobal so that they will be accessable from inside all used packages?No, that would beat the point of packages. If you want that, just don't use different packages.
But you can make a package variable known in the entire lexical scope, regardless of the current package. That's what 'our' does. So if you write
it ought to work.our $var = "CG";
In reply to Re: Access variable from inside a package?
by JavaFan
in thread Access variable from inside a package?
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |