in reply to Re: Difference b/w my and local var?
in thread Difference b/w my and local var?
local() variables, on the other hand, are visible to routines that are called from the block where they are declared.
Not quite. It doesn't make the variables visible outside the block.
sub foo { ??? how do you access the var ??? } { my %hash; local $hash{foo} = 123; foo(); }
It doesn't even create variables as your wording suggests. It's not that what you said is wrong, just unclear and/or misleading. (Compare to what I used earlier.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Difference b/w my and local var?
by Fletch (Bishop) on Mar 11, 2009 at 19:27 UTC |