my ($x, @y); $x="0:"; foreach (sort { $word2_hash{$b} <=> $word2_hash{$a} or $a cmp $b} keys %word2_hash) { $x .= "|$_"; #add identical words push @y, $word2_hash{$_}; #add times } my $chart = URI::GoogleChart->new("lines", 400, 150, data => \@y,#it is OK to parse array_ref range_show => "left", range_round => 1, color => ["red"], chxl => "$x", # chxt => "x", ); #getstore($chart, "chart.png"); #print "get pic\n";