in reply to Compare and Sort Arrays

you might want to give Algorithm-Diff (Compute `intelligent' differences between two files / lists) and Text-Diff (Perform diffs on files and record sets) a try.