http://www.perlmonks.org?node_id=1123066


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
    Ah, I see. I was not aware of that. Thank for the pointer.
      Thank for the pointer.

      Made me smile.