Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm able to print out the room names, but can't figure how to get the status or id. this is my code:$VAR1 = { 'Room2' => { 'tag' => '10', 'status' => 'active', 'id' => '1234' }, ...
Any pointers greatfully accpeted!foreach my $room ( keys %{$ret} ) { print $room; print {$room}{id}; #doesn't work foreach my $id (keys %{$ret{$room}}){ print $id; #nothing print {$ret}{$room}->{$id} ; } print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hash of hashes
by Loops (Curate) on Apr 18, 2013 at 03:00 UTC | |
by NetWallah (Canon) on Apr 18, 2013 at 03:29 UTC | |
|
Re: hash of hashes
by 2teez (Vicar) on Apr 18, 2013 at 04:00 UTC |