in reply to parallel procesing

Iterate over the indexes:
for my $i (0..$#$array1) { print("$array1->[$i], $array2->[$i]\n"); }
or
for my $i (0..$#$array1) { my ($x, $c) = ($array1->[$i], $array2->[$i]); print("$x, $c\n"); }