Hi Monks,

I have four arrays (A, B, C, and D). Each array has been compared against the others to find pairs of items between all 6 combinations (e.g. A v B, A v C...). My problem is that I can't find a simple way to find lists of things e.g. which match each other in A, B and C but not in D, for example, where item A1 is paired to B2, and B2 is paired to C3 and C3 is paired to A1, but there is not an equivalent pair in D. This is getting very confusing for me and my code is getting long and complicated, can someone please suggest a nice way to do this?

Let me know if the problem isn't clear!

Here is an example of the data, all comparison files have been split in two, giving 12 arrays. The first element in @A_v_B1 is paired with the first element of @A_v_B2 etc

. This example shows pairwise comparison of A,B and C only, A101 matches B302, which both match C302.

@A_v_B1 @A_v_B2 A101 B302 A103 B405 A104 B406 @A_v_C1 @A_v_C2 A101 C302 A106 C305 A109 C306 @B_v_C1 @B_v_C2 B302 C302 B103 C415 B104 C416

In reply to confusing array comparison by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.