in reply to updated: hash value $value

Go a few levels deeper.

$hoh{test}{groups} = { ... }; $hoh{test}{contacts} = { ... }; $hoh{prod}{groups} = { ... }; $hoh{prod}{contacts} = { ... };