in reply to Mysterious for behavior
I belive what is happening is that each statement in the for is being evaluated from left to right, thus making the $i = 1 portion win out. The list the loop works on becomes ($i, $i, $i), which makes the complete code equivilent to:
my $i = 1; for ( $i, $i, $i ) { print "$_ and $i\n"; }
----
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Mysterious for behavior
by Roy Johnson (Monsignor) on Apr 21, 2004 at 19:12 UTC | |
by Belgarion (Chaplain) on Apr 22, 2004 at 22:05 UTC |
In Section
Seekers of Perl Wisdom