Given the above snippets you provided, you would do this:
foreach $date ( @weather_days ) { $weather_archive{$date->{Year}}{$date->{Month}}{$date->{Day}} = ( $date->{High}, $date->{Low}, $date->{Season}, $date->{Wind}, $date->{Bar} ); }
For that to work right, you need to not be pushing %hash onto @array (that will flatten hash into a list) but rather push @array, {%hash}; (push an anonymous hash reference).

I'm sure that my snippet can be done with a map too but this is good enough. Oh, and that's the part that perlreftut would give you a better grasp on. Go ahead and read perlreftut and perlref as mentioned earlier so that you won't flunk the exam at the end of the semester. Producing working code today, and understanding the concepts behind it are two different things. This is something that you will use a lot once you understand the concepts. Failing to dig until the concept sinks in is going to cripple your progress.


Dave


"If I had my life to do over again, I'd be a plumber." -- Albert Einstein

In reply to Re: Re: Re: Re: Re: 3D array of hashes by davido
in thread 3D array of hashes by ManyCrows

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.