Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
and I want the first two elements (1 and 2) use in another Array.@array1 = (1,2,3,4,5);
How do I do this? With grep? With splice? with push?? Thanks for your help@array2 = (1,2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to push the first two elements of an array in another array
by choroba (Cardinal) on Sep 16, 2014 at 09:31 UTC | |
|
Re: How to push the first two elements of an array in another array
by AnomalousMonk (Archbishop) on Sep 16, 2014 at 09:31 UTC | |
|
Re: How to push the first two elements of an array in another array
by Anonymous Monk on Sep 16, 2014 at 09:29 UTC |