If I'm not mistaken (I didn't run any code), you are pushing lists with one element (namely the bigest index of the list you IMO intend to push) onto @fixed.
After that you push a lot of arrays containing only 1 (that is: (1,)) onto @graphdata.
please use strict!
try something like this, take the time to notice the differences between your example and this one:
use strict; my @labels = qw(my one word labels); my @graphdata = (\@labels); my @sets = (); # looping and data building, fillings @sets foreach my $set (@sets) { my $se = []; # process $set into $se push @graphdata, $se; } my $graph; # GD::Graph stuff my $gd = $graph->plot(\@graphdata);
Try to understand what you are doing, read a lot, debug your code (e.g. use Data::Dumper), read perldata and perlref thoroughly ;-)
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
In reply to Re: Re: Re: pushing into arrays of arrays
by Tomte
in thread pushing into arrays of arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |