|
|
| Just another Perl shrine | |
| PerlMonks |
Re^2: Dereference string in foreachby 7stud (Deacon) |
| on Feb 13, 2013 at 23:01 UTC ( #1018653=note: print w/ replies, xml ) | Need Help?? |
|
Here is the effect when perl localizes a variable: #Whoops. An Anonymous Monk already posted a good example.And because a for loop aliases each element in the array to the loop variable, changes to the loop variable change the elements of the array.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||