Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Monks, I have two arrays @a and @b.
@a = (1, 2, 3, 4, 5, 6); @b = ( 3, 4 , 5, 6, 7, 8);
If i find the difference i am getting 1 , 7, 8.
I tried using Set::Scalar.
But what i want is, only the new elements in @b from other than @a. For example in the above arrays, i need only 7 and 8 not 1, 7, 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array difference
by bobf (Monsignor) on Apr 28, 2005 at 04:13 UTC | |
|
Re: array difference
by Fletch (Bishop) on Apr 28, 2005 at 04:03 UTC | |
|
Re: array difference
by davido (Cardinal) on Apr 28, 2005 at 04:06 UTC | |
|
Re: array difference
by Errto (Vicar) on Apr 28, 2005 at 04:07 UTC | |
|
Re: array difference
by gube (Parson) on Apr 28, 2005 at 07:09 UTC | |
|
Re: array difference
by Mati the Perl Lover (Initiate) on Nov 25, 2011 at 17:58 UTC | |
|
Re: array difference
by NateTut (Deacon) on Apr 28, 2005 at 14:33 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |