Note: Regkey and Regvalue used to maintain a distinction from the hash definition of the terms key and value.
Perhaps you want an extra step, and to have a hash of regkeys=>{...} and regvalues=>{...}. You can't have two regkeys with the same name or two regvalues with the same name, but you can have a regkey and a regvalue with the same name.
{
'Regkeys' => {
HKEY_CURRENT_USER => {
'Regkeys'=>{...},
'Regvalues'=>{'(default)'=>{type=>REG_SZ, value=>un
+def},
...},
},
HKEY_LOCAL_MACHINE => {...},
},
'Regvalues' => {'(default)'=>{type=>REG_SZ,value=>undef},
...},
}