Using win32::TieRegistry

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
This with activestate 5.12 on win7:  I can't seem to get tieregistry to
work: everything I do just results in an "undef".  for example,

use strict;
use warnings;
use Win32::TieRegistry ;
use constant KEY => 'LMachine\Software\Microsoft' ;
my $key = $Registry-> ;
print $key ;

Quoted text here. Click to load it

I know it is finding *something* because if I give it a broken keyname
[e.g., if I left off the "+" :o), I get:
    No such root key (KEY) at D:\Perl\ line 10
So tieregistry knows that what I'm giving it is a proper key, but I can't
figure out how to get the value back.  I must be missing something, because
I typed in the exact program from the ActivePerl docs:
my $ms = $Registry-> ; ;
my $tips = $ms-> ;
my $tip18 = $tips-> ;
say $tip18 ;

and I get an undef error on the 'say'. [actually, I get 'undef's all the
way through: $ms and $tips are undef, also].  I'm clearly not understanding
something about using the tieregistry.  Is there a tutorial or something
somewhere on how to use it??   Thanks!
Bernie Cosell                     Fantasy Farm Fibers            Pearisburg, VA
    -->  Too many people, too few sheep  <--          

Re: Using win32::TieRegistry

Quoted text here. Click to load it


If that doesn't help, you'd probably get better assistance by pursuing
it on perlmonks, rather than here.


Site Timeline