Madam has asked for the wisdom of the Perl Monks concerning the following question:
how to compare 2 arrays at one shot?
For e.g, i have arrays
i want to compare the 2 arrays without using hashes at one shot. desired output : Compare(@arr1,@arr2) = not matching. Compare(@arr1,@arr3) = matching@arr1 = ("book","pen","pencil"); @arr2 = ("pen","pencil",book",eraser"); @arr3 = ("pen","pencil","book");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: comparsion of 2 arrays
by marto (Cardinal) on Jun 23, 2005 at 09:07 UTC | |
Re: comparsion of 2 arrays
by davidrw (Prior) on Jun 23, 2005 at 11:23 UTC | |
Re: comparsion of 2 arrays
by lupey (Monk) on Jun 23, 2005 at 11:48 UTC | |
Re: comparsion of 2 arrays
by tphyahoo (Vicar) on Jun 23, 2005 at 10:02 UTC | |
by marto (Cardinal) on Jun 23, 2005 at 10:34 UTC | |
by tphyahoo (Vicar) on Jun 23, 2005 at 11:04 UTC | |
Re: comparsion of 2 arrays
by blazar (Canon) on Jun 23, 2005 at 09:52 UTC | |
Re: comparsion of 2 arrays
by rev_1318 (Chaplain) on Jun 23, 2005 at 09:53 UTC |
Back to
Seekers of Perl Wisdom