Suppose there are two arrays of arrays:
@A = ( [A, 1], [B, 3], [C, 4], [D, 6] );
@B = ( [A, 2], [B, 5], [C, 3], [A, 3], [E, 7] );
For each of $A[0][0], $A[1][0], $A[2][0]..., I want to find the corresponding one in @B (match the letter, like $A[1][0] eq $B[1][0]), and print out both the second item, for example, $A[1][1] and $B[1][1].
How can I do this in perl? grep + map? Hope I clarify the problem here.
Thanks a lot!