Notice above I use the scope operator. With our the scope operator is not needed. The name of variable $bar in package Foo is $Foo::bar; however, when we declare $bar with our (i.e., our $bar; ), then to access $bar outside of package Foo we do not need the scope (i.e., $Foo::bar becomes just $bar).
While it may simply be a language issue, the above sounds incorrect to me. While our does make @xyz::array globally accessible, it is only accessible using a fully qualified package name (@xyz::array) outside its package (xyz) unless it is exported/imported. I am uncertain what you mean by the "scope operator" - do you mean the package name with double colon?
In reply to Re^2: Using variables, arrays etc from a perl module in main script.
by kennethk
in thread Using variables, arrays etc from a perl module in main script.
by avanta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |