|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: NEWBIE Brain Teaserby kha0z (Scribe) |
| on Apr 14, 2001 at 21:09 UTC ( [id://72613]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
I expected: 1 2 3 4 5 Update:I understand what is going on now. Thanks for the clarification kundra. Another Update:I just want to make sure that I understand this. In the "foreach" loop $each is assigned a reference to a scalar value in @list. So when $each is modified in the loop what is actually being modified is $list[$i] which happens to be same value as $newlist[$i]. Right?
Good Hunting,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||