Went to perlmonks.
Wow, wow, wow.
Allow me to apologize now to anybody who read this and laughed, or winced: Sorry. This stuff is leagues below normal u.p.o journal entries.
That said, as long as it's not an issue, I think I'll keep writing in this journal. Once I've gotten this program functional, I'll just wipe all the old entries out and start fresh.
Actually, the reason I'm writing here is because my post at perlmonks has resulted in several solution replies and I'm going to implement one of them.
The point was made that it could be done with hashes, and fairly easily, it would seem. (It's always easy after you do it; I just need to do it now. ;-) ) Drop the whole of both arrays into a hash, dealing with duplicates as you go, and then you've got a hash you can sort or fix or what-have-you.
Problems will be there, of course; and I'll document that next entry.