# 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; }