keithbas has asked for the wisdom of the Perl Monks concerning the following question:
This is what I want to do in theory but don't have a clue if it can be done:while (my @kp_src_t_row=$sth->fetchrow_array()) { for ($column=0; $column<@kp_src_t_row; $column++) { $currentarray[$kp_num][$column] = $kp_src_t_row[$column]; } $kp_num++; }
Such that in the end @currentarray would contain many rows of the data retrieved from the fetch into @kp_src_t_row. Thanks.while (my @kp_src_t_row=$sth->fetchrow_array()) { $currentarray[$kp_num]= @kp_src_t_row $kp_num++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Assigning an Array to a Multidimensional Array
by premchai21 (Curate) on Apr 23, 2002 at 16:10 UTC | |
|
Re: Assigning an Array to a Multidimensional Array
by perlplexer (Hermit) on Apr 23, 2002 at 16:07 UTC | |
|
Re: Assigning an Array to a Multidimensional Array
by gryphon (Abbot) on Apr 23, 2002 at 16:14 UTC | |
|
Re: Assigning an Array to a Multidimensional Array
by gav^ (Curate) on Apr 23, 2002 at 17:13 UTC | |
|
Re: Assigning an Array to a Multidimensional Array
by drewbie (Chaplain) on Apr 23, 2002 at 20:44 UTC |