Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: confusing array comparison
by BrowserUk (Patriarch) on Feb 07, 2006 at 12:34 UTC | |
by Anonymous Monk on Feb 07, 2006 at 12:40 UTC | |
by BrowserUk (Patriarch) on Feb 07, 2006 at 13:17 UTC | |
| |
|
Re: confusing array comparison
by Roy Johnson (Monsignor) on Feb 07, 2006 at 15:34 UTC | |
|
Re: confusing array comparison
by idle (Friar) on Feb 07, 2006 at 12:19 UTC | |
| |
|
Re: confusing array comparison
by marto (Cardinal) on Feb 07, 2006 at 12:35 UTC | |
|
Re: confusing array comparison
by graff (Chancellor) on Feb 08, 2006 at 05:40 UTC |