On Thu, 2004-01-29 at 14:17, Rob Dixon wrote: > but /please/ go back a few steps and explain what you want you're > trying to do. I doubt that putting characters 'A' .. 'H' into > an array is your goal. What you're starting with and what end you > have in mind is fundamental. Abstract as little as you can. > > Rob
Rob, Ok, I finally got my script to do what I want with the code below. my @tmp = ($custno, $cname, $arcode, $invbal, $curr, $thirty, $sixty, $ninety, $ovrninety, $ile, $ca); for (my $j = 0; $j < $#tmp; $j++) { $data[$j][$i] = $tmp[$j]; } $i++; What I'm doing is building an MDA of data to send to the Spreadsheet::WriteExcel module. Think of the MDA as a Spreadsheet. I'm trying to format the data (built by growing it one row/column at a time) inside the MDA as I'd like to see it in the Spreadsheet. I do this a lot and am trying to come up with a few subroutines to "display" my data correctly in a MDA so that I can send the data to the S:WE module in one call $ws->write(0, 0, [EMAIL PROTECTED]); and go about my business. The code above "displays" my data in "rows". If I just said: push @data, [EMAIL PROTECTED]; My data would be displayed in a "column". I'd like to be able to send any array of values, for example @tmp from above, to a subroutine, for example &displayVert, and it would append that to a MDA as a "column". If I sent it to &displayHoriz, it would be appended as a "row". I know this is kind of lazy to format my data before sending it to S::WE, but who can blame me....I'm a Perl programmer....it's in my blood. Thoughts, suggestions, insults? Thanks for all your help, 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>