When this happens, I simply want to remove one copy of the pair and keep the other (remove one element from each array)
You don't explain which array the element should be removed from. In your example, you show one of a set of duplicates being removed from the first array and one from the other set of duplicates being removed from the other array. Could they always be removed from the same array? Do you wish to switch off and remove from first one, then the other, then the first, etc.?
Once you figure that out, it should be pretty easy to do. Hint: use a hash (or two if necessary.) The keys of a hash are unique.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: comparing arrays
by sauoq
in thread comparing arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |