Becky has asked for the wisdom of the Perl Monks concerning the following question:
@array1 = (1,2,214,215,216,217,218,219,220,221);
@array2 = (214,215,216,217,218,219);
What I need to end up with is another array containing just those numbers that occur in both array1 and array2, so that I can then compare this new array with a third array and repeat the process.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: comparing arrays
by pbeckingham (Parson) on Apr 28, 2004 at 11:23 UTC | |
|
Re: comparing arrays
by phenom (Chaplain) on Apr 28, 2004 at 11:03 UTC | |
by phenom (Chaplain) on Apr 28, 2004 at 12:22 UTC | |
|
Re: comparing arrays
by Art_XIV (Hermit) on Apr 28, 2004 at 12:30 UTC | |
|
Re: comparing arrays
by edan (Curate) on Apr 28, 2004 at 14:57 UTC | |
|
Re: comparing arrays
by QM (Parson) on Apr 28, 2004 at 13:58 UTC | |
|
Re: comparing arrays
by McMahon (Chaplain) on Apr 28, 2004 at 15:00 UTC | |
|
Re: comparing arrays
by EdwardG (Vicar) on Apr 28, 2004 at 12:28 UTC | |
by eric256 (Parson) on Apr 28, 2004 at 15:39 UTC | |
by EdwardG (Vicar) on Apr 28, 2004 at 15:59 UTC |