This morning I was working on building a table from a hash. I tried doing it on my own, but I just got confused so asked for help. Several monks swung into action to assist, bless them. About that time my beloved wanted to use the computer, so I had to move. Being a night person, I was also a bit sleepy; so when he got on the computer, I went to bed. After I woke up and logged onto Perl Monks, I saw I got a solution. I put it into action after having to do a little fiddling of my own. The results were not as I expected.

I was looking at the results and wondering why they were the way they are. I thought I had a hash of arrays, so that is what I called it when getting the above help. The words "array" and "sort" were floating around my mind. That is when I remembered reading that arrays are sorted.

Okay, so not only did my hash keys get sorted so did my array values, but then another thing hit me, they are not arrays at all. They are hashes just without the value names and fat commas.

That made me think about what I really wanted out of the script I am attempting to write. I realized that this was not just a simple hash of hashes. It needs to be a hash of hashes of arrays.

All of the above thinking took place in less than a minute after I got the results. I was a little tickled with myself for figuring this out on my own. I usually run to the chatterbox as if the sky were falling.

So, here I sit; knowing what I wanted this to be; and not knowing how to make it work as is, if that is even possible. I have already begun researching it, but any pointers of where to look or what search terms to use would be appreciated.

Lady Aleena

"An it harm none, do as ye will."


In reply to A moment with Perl by Lady_Aleena

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.