GD::Graph problem -> Fixed

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David A. Sinck
Date:  
Subject: GD::Graph problem -> Fixed

\_ SMTP quoth Mike Starke on 3/27/2003 14:52 as having spake thusly:
\_
\_ I fixed my own problem. However, I do not understand why it works.
\_ What makes these two differant? (I know some of you Perl guys are shaking
\_ your heads on this one, but how else am I to learn? :-)

Learning is ok. Repeating, however, .... :-)


\_ #while (@ary = $sth->fetchrow_array()) {
\_ # push (@data, [@ary]);

"Push onto the @data array, the array ref continaing @ary"

@data gets longer here.

\_ #}
\_
\_ while (($c1, $c2) = $sth->fetchrow_array()) {
\_ push (@{$data[0]}, $c1);
\_ push (@{$data[1]}, $c2);

"push onto the array at $data[$n] the value of $cN"

the arrays pointed to by $data[0], $data[1] get longer, @data remains
same length.

David
    Give a man a match, and he'll be warm for a minute, but set
    him on fire, and he'll be warm for the rest of his life.