This should match each pair for you:
for my $key_raw (@keys_raw) { for my $key_ref (@keys_ref) { .... } }
Update:
Hm... this is just in general. In your case, both arrays are sorted, so you should use something that has a better performance. You should always remember the last used index for the inner loop. For each iteration of the outter loop, the inner loop should start from there.
In reply to Re: Multiple loop variable in foreach statement
by pg
in thread Multiple loop variable in foreach statement
by tc1364
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |