in reply to Re: difference between my and local
in thread difference between my and local
The best rule of thumb is to use my unless you have some particular reason to use something else.# main scope $fred = 1; #global { # outer scope my $fred = 2; #... { #inner scope print $main::fred; # prints the global 1 } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: difference between my and local
by Moron (Curate) on Nov 15, 2005 at 14:26 UTC |