in reply to Hash map in perl/tk
It looks to me like there is an SQL question that isn't being asked. Basically if you use the DB to correlate the stuff that belongs to one date into a single row (01/01/2012 -2.24 -2.25), then the job of sticking this data into the display becomes easier.
As it is now, its looks like you will have to write Perl code to correlate this one line per city stuff into a "spreadsheet like" format. You didn't show any of the SQL code. But the closer the results returned from SQL are to what you want to be displayed on the row, the less Perl code there will be (i.e. if @row winds up actually being a "row" in the display instead of column in the display, then I think the transformation to the display is easier). But I don't know how to help with this absent the SQL query stuff.
As an example, if the SQL could return something like below, then creating the display should be easier? I am certainly not an SQL guru, but other Monks are.
my @rows = [("01/01/2012","San Jose",2.24,"New York",2.25), ("01/02/2012","San Jose",2.31,"New York",2.13), ("01/20/2012","San Jose",undef,"New York",3.12) ];
|
|---|