Note that you will most likely use $Registry instead of using a tied h
+ash. $Registry is a reference to a hash that has been tied to the vir
+tual root of your computer's Registry [as if, $Registry= \%RegHash].
+So you would use $Registry->{Key} rather than $RegHash{Key} and use k
+eys %{$Registry} rather than keys %RegHash, for example.
In the snippet you show, your tieing the hash %RegHash to the registry, and you would need to use that variable to access the registry.
Ie. for $subkey (key %RegHash ) { ...
Or, you need to initialise $Registry as a reference to %RegHash my $Registry = \%RegHash; or, more likely, to some subhash of %RegHash that contains the values you are interested in.
The other thing to note about these variable names is that they are not predefined or set in stone, they are just example names used in the documentation. You can use any names that you like, but you will need to declare/initialise them before you use them.
Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.
|