Isn't $globalVar (when not defined as a lexical variable) just a shortcut for the (main) package variable $::globalVar aka $main::globalVar?
It is a 'shortcut' only if you make the lexical declaration
our $globalVar;
Then if the first access of the package variable $globalVar is after the declaration, everybody's happy; otherwise, the variable name must be fully qualified. See our.
In reply to Re^3: Importing variables (not functions) from in-file packages
by AnomalousMonk
in thread Importing variables (not functions) from in-file packages
by puterboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |