In addition to Data::Dumper and friends, the perl debugger is an excellent tool to slowly dive into a data structure, and understand how to access it.

Here is a debugger session, based on a made-up structure, similar to yours:
I have interjected comments starting with >>

$ perl -dE 'my @revs=([{author=>"myid",date=>"2013-06-21"},2,3]); say +$revs[0]{date}' Loading DB routines from perl5db.pl version 1.33 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): my @revs=([{author=>"myid",date=>"2013-06-21"},2,3]); + say $revs[0]{date} >>>> Step into the initialization of the structure .... DB<1> s main::(-e:1): my @revs=([{author=>"myid",date=>"2013-06-21"},2,3]); + say $revs[0]{date} >>>>>*** Looking at the whole structure (Not a good idea if it is larg +e) DB<1> x @revs 0 ARRAY(0x1765270) 0 HASH(0x1765210) 'author' => 'myid' 'date' => '2013-06-21' 1 2 2 3 >>>>> Slow dive - We know @revs is an ARRAY - let us see what TYPE the + first (0) element is : DB<2> x ref $revs[0] 0 'ARRAY' >>>> OK - so it is an 'ARRAY' - lets examine the TYPE of the first (0) + index. DB<7> x ref $revs[0][0] 0 'HASH' >>> Aha - so $revs[0][0] is a HASHREF - lets see what KEYS are availab +le... DB<9> x keys %{ $revs[0][0] } 0 'date' 1 'author' >>>> Now we could do another "ref', but assuming this will result in a + target value, we simply try a key: DB<10> x $revs[0][0]{date} 0 '2013-06-21' >>> end the debug session with 'quit' DB<11> q
so Now we know why "$revs[0]{date}" did not work.

             "The trouble with the Internet is that it's replacing masturbation as a leisure activity."
        -- Patrick Murray


In reply to Re: Array of Hashes Svn::Log confusion by NetWallah
in thread Array of Hashes Svn::Log confusion by gj2666

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.