brassbin has asked for the wisdom of the Perl Monks concerning the following question:
hi,
i have a hash of hash like this
%hoh = ( 'item1' => { 'key1' => '1', 'key2' => '1', 'key3' => '0' }, 'item2' => { 'key1' => '0', 'key2' => '1' } )
this call of delete
delete $hoh{$item2}deletes the sub-level hash but it does not delete the top level key "item2" itself, how do i delete the key "item2" itself after deleting the sub hash below it?
Thank you very much!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to use "delete" with a hash of hash
by smls (Friar) on Jan 29, 2013 at 00:36 UTC | |
|
Re: how to use "delete" with a hash of hash
by Athanasius (Archbishop) on Jan 29, 2013 at 02:32 UTC | |
by brassbin (Novice) on Jan 29, 2013 at 05:10 UTC | |
by muba (Priest) on Jan 29, 2013 at 05:44 UTC | |
|
Re: how to use "delete" with a hash of hash
by Rahul6990 (Beadle) on Jan 29, 2013 at 06:53 UTC | |
by brassbin (Novice) on Jan 29, 2013 at 14:05 UTC |