in reply to Re: complete deletion from hash
in thread complete deletion from hash

The following worked in scalar context without using keys to give list context. An empty hash gives 0 in scalar context.
delete $hoh{Testcase}{comp}{cmd} unless %{$hoh{Testcase}{comp}{cmd}}; delete $hoh{Testcase}{comp} unless %{$hoh{Testcase}{comp}};