in reply to Win32::TieRegistry - no object?
You need to read the follow (rather clumbsily phrased) passage from the Tie::Registry pod.
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.
|
|---|