Think about Loose Coupling | |
PerlMonks |
Re^2: variable like $_by JavaFan (Canon) |
on Feb 04, 2009 at 10:06 UTC ( [id://741224]=note: print w/replies, xml ) | Need Help?? |
There is only one $_True. and the second use of it destroys the contents of the first use.False. The second use of '$_' doesn't destroy the content of the first use. It stores it somewhere else, and restores the value after the second use is finished. That's the principle of local. And that's what's happening with a foreach loop.
In Section
Seekers of Perl Wisdom
|
|