in reply to Difference b/w my and local var?
The variables declared with my() are visible only within the scope of the block which names them.
They are not visible outside of this block, not even in routines or blocks that it calls.
local() variables, on the other hand, are visible to routines that are called from the block where they are declared.
Neither is visible after the end of the block at all.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Difference b/w my and local var?
by ikegami (Patriarch) on Mar 11, 2009 at 13:51 UTC | |
by Fletch (Bishop) on Mar 11, 2009 at 19:27 UTC |