It is helpful to remember that your Array of Arrays is just an array of references. So it is only necessary to pop the references from one and push them on to the other. There is no need to copy the actual data. This:
push @$VAR1, pop @$VAR2;
... moves one array from VAR2 into VAR1. You can extend that with a simple map or foreach
In reply to Re: Merge 2 2d arrays
by starbolin
in thread Merge 2 2d arrays
by craret
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |