in reply to What is the difference between 'local' and 'my'?
The output from this program would be:$a = "one"; print $a, "\n"; routine(); print $a, "\n"; sub routine { local $a = "two"; print $a, "\n"; }
-kelone two one
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: What is the difference between 'local' and 'my'?
by goldclaw (Scribe) on Jan 25, 2001 at 01:38 UTC |