@garr = map { [ @$arr1[$_], @$arr2[$_] ] } 0 .. $#arr1;
But whilst the code looks simpler, I don't think it's actually any more efficient than your version.
"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg
In reply to Re: Expanding Two dimensional arrays
by davorg
in thread Expanding Two demensional arrays
by pigal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |