laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You can't:
local and my are different local does not work the same way as my. In particular, it doesn't create private variables. Variables declared local remain global. Instead, Perl assigns a temporary value to the variable, and then restores the old value when the variable goes out of scope.
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
In reply to Re: Get the $main value when use local
by jbrugger
|
|