kevsurf has asked for the wisdom of the Perl Monks concerning the following question:
Hello everyone,
I have:
I want to build a multidimensional array from the above arrays. I want to put @one in the first "column" of the array. I want to put @two in the second "column" of the array.
I want the resulting MDA to look like:
Any ideas? Sorry if this is not clear.
Kevin
@one = qw(A B C D); @two = qw(E F G H);
I want to build a multidimensional array from the above arrays. I want to put @one in the first "column" of the array. I want to put @two in the second "column" of the array.
I want the resulting MDA to look like:
@mda = ( [A][E], [B][F], [C][G], [D][H] );
Any ideas? Sorry if this is not clear.
Kevin
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: build multidimensional array from arrays
by broquaint (Abbot) on Jan 29, 2004 at 17:00 UTC | |
Re: build multidimensional array from arrays
by jonadab (Parson) on Jan 29, 2004 at 17:00 UTC | |
Re: build multidimensional array from arrays (mapcar)
by tye (Sage) on Jan 29, 2004 at 19:56 UTC | |
Re: build multidimensional array from arrays
by Limbic~Region (Chancellor) on Jan 29, 2004 at 17:04 UTC | |
Re: build multidimensional array from arrays
by blue_cowdawg (Monsignor) on Jan 29, 2004 at 17:05 UTC | |
by kevsurf (Acolyte) on Jan 29, 2004 at 18:40 UTC | |
by Not_a_Number (Prior) on Jan 29, 2004 at 19:10 UTC |
Back to
Seekers of Perl Wisdom