chipmunk is right that hashes are the right tool to use here. However, there are some instances when hashes are not usable:
I have had quite a lot of success with Algorithm::Diff. See also Re: Comparing Elements of Two Arrays.
In reply to Re: Re: comparing two hashes
by rinceWind
in thread comparing two hashes
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |