"Perl-style" for loop:
for my $i (reverse 0..$#a) { print("$a[$i], $b[$i]\n"); }
"C-style" for loop:
for (my $i=@a; $i--; ) { print("$a[$i], $b[$i]\n"); }
Update: Fixed crossed wires.
In reply to Re: Looping backwards through two arrays at once?
by ikegami
in thread Looping backwards through two arrays at once?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |