in reply to Expanding Two demensional arrays
@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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Expanding Two dimensional arrays
by pigal (Novice) on Jan 30, 2007 at 11:59 UTC |