in reply to Re: build multidimensional array from arrays
in thread build multidimensional array from arrays

Well, no that wasn't what I was looking for, but it's a nice piece of code to add to my arsenal. That basically puts the contents of @one in the first *row* of the @mda, @two in the second *row*. I want it to go in @mda in the *columns*. So...
$mda[0][0] = A; $mda[0][1] = B; so forth... $mda[1][0] = E; $mda[1][1] = F; so forth...

A little background on why I want to do this is that I'm formatting data in arrays to that I can send the Spreadsheet::WriteExcel module a reference to an MDA so that it writes the spreadsheet "contents" from one call to
$ws->write(0, 0, \@mda); #writes all data into spreadsheet

Thanks,
Kevin

Replies are listed 'Best First'.
Re: Re: Re: build multidimensional array from arrays
by Not_a_Number (Prior) on Jan 29, 2004 at 19:10 UTC

    In that case, it's even easier:

    my @mda = ( [ @one ], [ @two ] );

    Update: Or, of course, to save a bit of typing:

    my @mda = \( @one, @two );

    dave