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 | |
by tphyahoo (Vicar) on Jun 23, 2005 at 11:04 UTC |
In Section
Seekers of Perl Wisdom