I do have a further question. I tried to manually traverse my hash so that I can print the keys separated by newline and tab however because the hash is more than 2 dimensions I am experiencing trouble. (http://perlmaven.com/multi-dimensional-hashes) Here is the piece of code that I wrote.

#foreach my $symb (sort keys %go_hash) { #foreach my $UniID (keys %{ $go_hash{$symb} }) { #foreach my $TaX (keys %{ $go_hash{$symb}{$UniID} }) { #print "$symb, $UniID, $go_hash{$symb}{$UniID}{$TaX}\n"; #} #} #}

and here is a sample output:

Hey, HSWZH7, HASH(0x7fdeb30dc310) how, HSX0L1, HASH(0x7fdeb3169768) are, HSX1I1, HASH(0x7fdeb31784b0) you, HSX4J3, HASH(0x7fdeb31784b0)
The "prettiest" I have made my output using data::dumper so far is to set the indent to 1 and pair to "\t" as shown below. $Data::Dumper::Pair = " \t "; $Data::Dumper::Indent = 1; Thanks again.

In reply to Re^2: Multidimensional hash help! by ila14
in thread Multidimensional hash help! by ila14

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.