ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
Re: help with Win32::TieRegistry
by Anthony Okusanya other posts by this author
Aug 27 2008 5:30PM messages near this date
Re: help with Win32::TieRegistry | Buffering piped output of a script to another script...
From:
Bill Luebkert <dbecoll@[...].com> 
To:
anthony.okusanya@[...].com
Cc:
ActivePerl@[...].com
Date:
08/27/2008 07:24 PM
Subject:
Re: help with Win32::TieRegistry



anthony.okusanya@[...].com wrote:
>  
>  Greetings All
>          I am having trouble using the Win32::TieRegistry's CreateKey 
method
>  sample code is given below. It does not create the key.
>  Im not sure what Im missing here.
>  
>  #========================================
>  use Win32::TieRegistry (Delimiter => "/",
>          SplitMultis => 1,  AllowLoad => 1,
>          qw( REG_SZ REG_EXPAND_SZ REG_DWORD REG_BINARY REG_MULTI_SZ
>              KEY_READ KEY_WRITE KEY_ALL_ACCESS ),
>      );
>  
>  if($Registry->CreateKey("LMachine/SOFTWARE/TestKey")) {

Not sure why yours fails, but try it like this:

   if($Registry-> CreateKey("LMachine/SOFTWARE/TestKey", {})) {

>          print "Reg Key created \n";
>  }
>  else {
>          print "Failed to create key \n";
>  }
>  
>  #========================================
>  
>  I can however create the key using (much easier syntax I know)
>  $Registry->{"LMachine/SOFTWARE/TestKey"} = {};
>  
>  As always Thanks in Advance for your assistance
>  


Thanks Bill I tried the empty {} and it still doesnt work on my machine 
(perl 5.8.8)
if($Registry-> CreateKey("LMachine/SOFTWARE/TestKey", {})) {

        print "Reg Key created \n";
}
else {
        print "Failed to create key \n";
}




U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, o
r may be, covered by electronic communications privacy laws, and is also confidential and pr
oprietary in nature. If you are not the intended recipient, please be advised that you are l
egally prohibited from retaining, using, copying, distributing, or otherwise disclosing this
 information in any manner. Instead, please reply to the sender that you have received this 
communication in error, and then immediately delete it. Thank you in advance for your cooper
ation.



---------------------------------------------------------------------
Thread:
Anthony Okusanya
Bill Luebkert
Anthony Okusanya

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved