I don't think I've ever made a fence post error on
where I would not modify @array or $i, nor use $i to look elsewhere in the array. But then, this is about the only case where I would not use a C-style for loop, but a Perl style foreach.for (my $i = 0; $i < @array; $i++) { ... }
In reply to Re^5: In Need of Mentoring
by JavaFan
in thread In Need of Mentoring
by qazwart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |