Assigning a hash to a registry key will only create additional subkeys/values for thoses keys of the right hand side hash, that aren't already a subkey of the left hand side registry key.
It will not lead to the deletion of subkeys in the left hand side registry key.
for deleting a subtree you have to get rid of its subkeys, so that delete can proceed.
Recursively traversing the tree, would do the job.
# this is only pseudo code # refine and apply at your own risk (of damaging your Registry) sub delkey { my $key = shift; delkey($_) for grep isasubkey($_), keys %$key; delete $key; }
It's actually more difficult, since you have to make it delete $parent->{$keyname} as described in the docs.
Good luck!
In reply to Re: Win32::TieRegistry - deleting values or keys with subkeys present.
by pKai
in thread Win32::TieRegistry - deleting values or keys with subkeys present.
by Sioln
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |