The ways you've listed are pretty standard for using for, with the second being somewhat preferred, IMO.
Update: if you use method #1, put the increment in a continue block.
In reply to Re: array looping with foreach
by Roy Johnson
in thread array looping with foreach
by bst_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |