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:
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.Hey, HSWZH7, HASH(0x7fdeb30dc310) how, HSX0L1, HASH(0x7fdeb3169768) are, HSX1I1, HASH(0x7fdeb31784b0) you, HSX4J3, HASH(0x7fdeb31784b0)
In reply to Re^2: Multidimensional hash help!
by ila14
in thread Multidimensional hash help!
by ila14
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |