I think you want a combination of zip and natatime ("n-at-a-time") from List::MoreUtils:
my $pairs = natatime 2, zip $array1, $array2; while (my (@vals) = $pairs->()) { ... };
zip "zips" together two lists, alternating the elements. natatime returns you n elements from a list.
In reply to Re: parallel procesing
by Corion
in thread parallel procesing
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |