Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Not to nitpick, but thought you might find this interesting:
This prints "656". What is means is, that within the subroutine foo, I can get to the package $var without having to use a full package name ($main::var). The our declaration makes it clear that within this lexical scope "$var" means the package variable, not the lexical $var that exists in the enclosing scope. Sometimes there are uses for "our" inside of subroutines. update: of course I meant $main::var In reply to Re: Re: fixing use of
by clintp
|
|