in reply to NEWBIE Brain Teaser
I expected:
1
2
3
4
5
Update:I understand what is going on now. Thanks for the clarification kundra.
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,
kha0z
|
---|
Replies are listed 'Best First'. | |
---|---|
(kudra) Re2: NEWBIE Brain Teaser
by kudra (Vicar) on Apr 15, 2001 at 01:21 UTC | |
by nysus (Parson) on Apr 15, 2001 at 01:39 UTC | |
by moen (Hermit) on Apr 15, 2001 at 01:39 UTC |
In Section
Seekers of Perl Wisdom