I am having trouble accessing a hash of unknown dimensions. I have an anonymous hash which looks like this :
$data{$a}{$b}{$c}{columns} = @ $data{$a}{$b}{$c}{values} = @ $data{$d}{$e}{columns} = @
As you can see from the structure I will always have columns and values key at the end which points to an array. I wrote a subroutine thanks to the help of the monks (see unknown number of dimensions of a multidimensional hash) to build this structure and now I am having problems accessing that data! Can you show me the way to go through the levels of the hash until I reach those keys and print or manipulate those arrays? Should i be storing those keys in an array and use those and if so how would I use them? Thanks in advance.

In reply to Accesing hash of unknown dimension by Otogi

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.