See List::Compare.
In reply to Re: correspondence between two arrays by marto in thread correspondence between two arrays by anasuya