http://qs1969.pair.com?node_id=469340


in reply to comparsion of 2 arrays

You might want to check out String Comparison by Madam, a recent discussion on basically the same theme. In resolving all these types of problems, the best approaches seem to involve morphing from string to array and back with sort/join. You asked a question about arrays, Madam asked a question about strings, but it's the same problem.

This also mentions some issues you need to think about, eg, how do you treat duplicate elements in the list; how do you treat whitespace; etc.

Reasonablekeith's solution, towards the bottom, seemed the best to me. Short and to the point.

You could also have a look at Array::Compare from CPAN, which I fished using a search engine. Good luck.