J
Jerry Preston
Hi!
I am lost in trying to deal an hash of arrays.
First I go out and collect a group of number and pass back:
$RESULTS = $DAT->read_data( ""9994658", $DEBUG );
This works great and I can print the contents:
print " @{ $RESULTS->{ names }->{ 'Jerry' }";
Now I want to pass this to a sub to print out a graph using GD;
&graph_data( $j, $x_label_o, $y_label_o, @{ $RESULTS->{ names }->{
'Jerry' }} );
sub graph_data {
my ( $date_type, $x_label, $y_label, @data ) = @_;
Then:
my $mygraph = GD::Graph::linespoints->new( 600, 400 );
I get the error:
Invalid data set: 0
at
$myimage = $mygraph->plot( \@data ) or die $mygraph->error;
I know that I am not passing the reference/deference correctly.
What am I missing?
Thanks,
Jerry
I am lost in trying to deal an hash of arrays.
First I go out and collect a group of number and pass back:
$RESULTS = $DAT->read_data( ""9994658", $DEBUG );
This works great and I can print the contents:
print " @{ $RESULTS->{ names }->{ 'Jerry' }";
Now I want to pass this to a sub to print out a graph using GD;
&graph_data( $j, $x_label_o, $y_label_o, @{ $RESULTS->{ names }->{
'Jerry' }} );
sub graph_data {
my ( $date_type, $x_label, $y_label, @data ) = @_;
Then:
my $mygraph = GD::Graph::linespoints->new( 600, 400 );
I get the error:
Invalid data set: 0
at
$myimage = $mygraph->plot( \@data ) or die $mygraph->error;
I know that I am not passing the reference/deference correctly.
What am I missing?
Thanks,
Jerry