note
Eimi Metamorphoumai
I'm not quite sure what you're getting at, but you can certainly get the global value from anywhere, without using <c>local</c>. Observe:
<code>
# main scope
$fred = 1; #global
{ # outer scope
my $fred = 2;
#...
{ #inner scope
print $main::fred; # prints the global 1
}
}
</code>
The best rule of thumb is to use <c>my</c> unless you have some particular reason to use something else.
508578
508591