in reply to How to create a "proper" array?
[1,2] is an array reference, not an array. To get an array reference from an array, use \@arrayname. So in your second case:
while (@rowdata = $sth->fetchrow_array()) { push (@chart_data, $rowdata[2]+0); push (@chart_labels, $rowdata[0].' '.$rowdata[1].':00'); } $graph->to_string(\@chart_data, labels=>\@chart_labels);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to create a "proper" array?
by bfdi533 (Friar) on Apr 10, 2015 at 19:38 UTC | |
by frozenwithjoy (Priest) on Apr 11, 2015 at 00:32 UTC |
In Section
Seekers of Perl Wisdom