I think Google chart may want JSON formatted data, so do have a look at the Perl JSON module. Its simple and fast. Otherwise you will be re-inventing wheels. Before that of course, you will need your data in something like the correct format. I guess you need an array of arrays...

# untested code use strict; use warnings; use Data::Dumper; use JSON; # read up on this, it may be a great help my $json = JSON->new->allow_nonref; my %elohimHash; # Not sure where this comes from, but obviously it mus +t be defined by here... my @ValsArray; for my $folderId (keys %elohimHash){ for my $customer (keys %{$elohimHash{$folderId}}){ for my $version (keys %{$elohimHash{$folderId}{$customer}}){ my $totSP = $elohimHash{$folderId}{$customer}{$version}{totSP +}; push @valsArray, [$version,$totSP]; } } } print Dumper \@ValsArray; print "-" x 30; print "\n"; print $json->encode(\@ValsArray);

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

In reply to Re: Filling a matrix by Random_Walk
in thread Filling a matrix by David92

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.