Do you want to print only "rows" where the values in each array are identical, or just side-by-side?
If just side-by-side, the code from FunkyMonk is just what you need, and easy to understand.
If you need only rows where the values are the same, do something like:
for (0 .. $#array1) {
if ($array1[$_] eq $array2[$_] && $array1[$_] eq $array3[$_]) {
print "$array1[$_], $array2[$_], $array3[$_]\n";
}
}
Note that the array indices start at 0, and $#array1 means the index of the last element in @array1. This assumes you haven't modified the value of a Perl special variable $[, which is discouraged.
If the values are numeric, you should use == instead of eq. If they are mixed - well, that's a more complicated issue, doing numerical comparisons on strings can cause unexpected results