use Win32::TieRegistry(Delimiter=>'/'); $| = 1; sub list_content { print join("\n","@_----------------",keys %{$Registry->{"@_"}},""); print "\n\nCheck your registry (HKEY_CURRENT_USER\TEST)...\n" . "Press to continue ..."; $_=<>; } my $maxname = 'x'x255; my $testkey = 'CUser/TEST/'; $Registry->{"$testkey/NonEmpty"} = 1; # List All Values in the Test Key &list_content($testkey); # Add a visible key and an invisible key $Registry->{"$testkey/$maxname"} = 1; $Registry->{"$testkey/INVISIBLE$maxname"} = 1; &list_content($testkey); # Remove them again delete $Registry->{"$testkey/$maxname"}; delete $Registry->{"$testkey/INVISIBLE$maxname"}; &list_content($testkey); print "You may want to delete HKEY_CURRENT_USER\\TEST now\n";