IamAwesom3 has asked for the wisdom of the Perl Monks concerning the following question:
Hello monks, I am trying to access multi dimensional array in hash. but I am not able to print the values seperately.
Output I get ismy ($key2,$item,$hash,$array); my %temp = ( "0x55555555" => { "0x55555555" => [ ["0xAAAAAAAA", "0x9"], ], "0xAAAAAAAA" => [ ["0xAAAAAAAA", "0x8"], ], }, "0xAAAAAAAA" => { "0x55555555" => [ ["0xFFFFFFFF", "0x8"], ], "0xAAAAAAAA" => [ ["0x55555554", "0x3"], ], }, ); foreach $item (keys %temp) { print "$item: \n"; my $hash = $temp->{$item}; foreach $key2 (keys %$hash){ my $array = $hash->{$key2}; for $i (0..$#$array){ print "$i: $$array[$i]\n"; } } }
0xAAAAAAAA: 0x55555555:
I want to access each and every element of the hash, How can I do that? Please help me. If you can explain it with a note then that will be great.
Thanks P
Back to
Seekers of Perl Wisdom