in reply to Re: for loop localisation bug?
in thread for loop localisation bug?
and the latter a straight loop counter similar in semantics as C's for() loop.
The latter is essentially syntactic sugar for a while loop. Consider:
for (my $n=1;$n<=10;$n++) { ... } # essentially becomes { my $n=1; while ($n<=10) { ... } continue { $n++; } }
Its my understanding that the continue part of while was specifically introduced to provide the c-style for loop behaviour.
First they ignore you, then they laugh at you, then they fight you, then you win.
-- Gandhi
|
|---|