My problem occurs when I want to fill my matrix / array. I have a HASH that contains some values:
%elohimHash{$folderId}{$customer}{$version}{points} = $totPoints;
I want to draw a Pie Chart using Google charts, so I need to create an HTML. This is not important part, as this is already done.My problem is to fill my array in a the way as it is described at the bottom of this question.
Check the code:
What I'd like to get is a Pie chart that will display all the version with their POINTS.foreach $folderId (keys %elohimHash){ foreach $customer (keys %{$elohimHash{$folderId}}){ foreach $version (keys %{$elohimHash{$folderId}{$customer}}){ $totSP = $elohimHash{$folderId}{$customer}{$version}{totSP}; @valueArray = ([$version,$totSP]); }}}
So my array should look like: @valueArray = ([version1, points1],[ version2,points2],[version3,points3]); etc. depending how many versions are there in Hash.
Any ideas?
In reply to Filling a matrix by David92
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |