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.

Replies are listed 'Best First'.
Re^2: comparsion of 2 arrays
by marto (Cardinal) on Jun 23, 2005 at 10:34 UTC
    "You asked a question about arrays, Madam asked a question about strings, but it's the same problem."

    Check out the name of the user who posted this question :)

    Cheers

    Martin
      Hehhh? Pardons to madam but... well, it is sort of the same problem, isn't it? Well, since my gut told me these issues were linked, I'm going back to that earlier thread and linking back here, at least then everything's tied together for future monks stolpering around here.