$VAR1 = { 'Room2' => { 'tag' => '10', 'status' => 'active', 'id' => '1234' }, ... #### 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"; }