Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: my and local??by monk (Scribe) |
on Jul 28, 2000 at 16:32 UTC ( [id://24836]=note: print w/replies, xml ) | Need Help?? |
The basic difference is that, when you declare $foo = 3; and then you go into a block or sub and say local $foo = 5; the value in $foo inside the blocks or sub is 5, but outside is 3 here is some code:
With my is a bit different code examples: I hope this clear, things up a bit, and i hope i'm not completely wrong if i am i'm sure the other monks, will point it out. monk Update:
monk
In Section
Seekers of Perl Wisdom
|
|