GD::Graph problem -> Fixed

David A. Sinck plug-discuss@lists.plug.phoenix.az.us
Thu, 27 Mar 2003 13:51:48 -0700


\_ 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.