On Thu, 2004-01-29 at 12:34, Jeff 'japhy' Pinyan wrote: > On Jan 29, Kevin Old said: > > >@one = qw(A B C D); > >@two = qw(E F G H); > > > > > >@mda = ( > > [A][E], > > Do you mean [A, E]? > > > [B][F], > > [C][G], > > [D][H] > >); > > If so, this is how I'd do it: > > @mda = map [ $one[$_], $two[$_] ], 0 .. $#one; > > If you need an explanation, feel free to ask.
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, [EMAIL PROTECTED]); #writes all data into spreadsheet Thanks, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>