$'var is an obsolete notation for $::var, which is also known as $main::var | [reply] [d/l] [select] |
| [reply] |
| [reply] [d/l] [select] |
So is this the same case with &' and @' as well to access global function and global array respectively? | [reply] |
No. ' is the name of the variable, and because you don't declare it, it is global, and because the current package is main, they are &main::' and @main::' respectively
$ perl -le"print \@', \@{qq!main::'!}"
ARRAY(0x979ff4)ARRAY(0x979ff4)
$ perl -le"print &'"
Undefined subroutine &main::' called at -e line 1.
| [reply] [d/l] |