go ahead... be a heretic | |
PerlMonks |
Re: Re: Help needed understanding global variables in Perlby shotgunefx (Parson) |
on Mar 05, 2002 at 11:05 UTC ( [id://149327]=note: print w/replies, xml ) | Need Help?? |
A clarification on the following point. The closest thing to a global variable in perl is a variable that lives in main::'s symbol table. This is because whenever a variable is referred it is always looked for in main::. But this is only a last resort, This is not true. If you are not in main:: it will not look in main for a variable unless you use our $var and then it's still only I belive in the current lexical scope.
-Lee "To be civilized is to deny one's nature."
In Section
Seekers of Perl Wisdom
|
|