in reply to Re^2: For loop trouble
in thread For loop trouble

I was taught that for structure was like this: (starting value, ending value, increment). But I infer from your response that it must be: (starting value, continue while this is true, increment)?

Won't hurt you to read the docs...

What's wrong:

What it really means

A common usage:

for (my $i = 0; $i < $n; ++$i) { ... }

The above is equivalent to the following, except $i is scoped to the loop.

my $i = 0; while ($i < $n) { ... } continue { ++$i }