The stupid question is the question not asked | |
PerlMonks |
Re: Push array into array of arraysby johngg (Canon) |
on Dec 18, 2018 at 15:29 UTC ( [id://1227404]=note: print w/replies, xml ) | Need Help?? |
Having a bit of a guess here but could it be that you need to push the array rather than a reference to the array? The following might illustrate the difference. Note that after the first push @AoA has three elements, the last of which is a reference to @newArr, but there are five after I pop off the array reference and do the second push of the array rather than a reference to it, the last three being the same values as are in @newArr.
I hope this is helpful. Update: Expanded explanation. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|