I also don't know what a "hash map" is?

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) ];

In reply to Re: Hash map in perl/tk by Marshall
in thread Hash map in perl/tk by vsurend

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.