in reply to Incrementing the loop again.
Are you sure about the value of $v? Have you printed it out and examined it?
I can't see the point in incrementing a counter variable after the end of the loop, but a more natural way to write your loop in Perl would be:
my $i = 0; for ( 1 .. 100 ) { $i++; # statements $i = 200 if $i == 100 and defined $v; }
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Incrementing the loop again.
by Anonymous Monk on Mar 13, 2016 at 02:47 UTC |