Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Parsing an SQL table using an array of hashes?

by chareTX (Initiate)
on Jul 01, 2013 at 00:33 UTC ( #1041679=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Parsing an SQL table using an array of hashes?
in thread Parsing an SQL table using an array of hashes?

Thank you very much -- this was very helpful. Two questions:

1. Can you explain this line for me please? I am just not sure I get it.

 push @y_plotdata,[@{$y_data{$cat}}];

2. I need to do the same thing, but reversed -- instead of category being the legend and dates on the x-axis, I need to do the categories on the a-axis, and the months in the legend.

I haven't started experimenting with it yet, but I wanted to say thanks for your help.


Comment on Re^4: Parsing an SQL table using an array of hashes?
Download Code
Re^5: Parsing an SQL table using an array of hashes?
by poj (Priest) on Jul 01, 2013 at 06:31 UTC
    [@{$y_data{$cat}}] is a ref to a copy of the data for one $cat.

    It is equivalent to [ $y_data{$cat}[0],$y_data{$cat}[1],$y_data{$cat}[2],etc ]

    For a plot of all periods this would work equally as well

    push @y_plotdata,$y_data{$cat};
    poj

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041679]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2015-07-03 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls