Bruce Ferrell wrote:
OK if I read these right and I understand the results of my experiments
correctly, this:
@rtn = $sth->fetchrow_array();
is giving me an array with two elements and this:
push @data, [ @rtn ];
is giving me an array of 2 element arrays. Not good as what I want is 2
arrays each the length of the total rows returned. What it seems I need
to do is something like this:
my ( $current_level, $time ) = $sth->fetchrow_array();
push @data[0][#]->$current_level;
push @data[1][#]->$time;
push @data, [ $current_level, $time ];
# To see inside, use Data::Dumper
use Data::Dumper;
print '@data = ', Dumper \...@data;
# Note that Dumper will add ' $VAR1 = ' ignore this
... repeat until out of rows
Is that correct notation to add the variable to the end of the array(s)?
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Perl; it's the only language where you can bless your
thingy.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/