Your arrays appear to represent sets. Consider using diffference method of the module Set::Array.
In reply to Re: Identical Arrays by BillKSmith in thread Identical Arrays by Anonymous Monk