Divakar has asked for the wisdom of the Perl Monks concerning the following question:

it is executed. didnt get any error. but dont find keys in the registry. any help please.

use strict; use warnings; use Win32::TieRegistry; $Registry->Delimiter("/"); my $swKey= $Registry->{"LMachine/SOFTWARE/"} or die "cant open the key +s $^E\n"; $swKey->{"dkanagar/"} = {"/Version" => "1.00"} or die "cant add the ke +ys $^E\n" ;

Replies are listed 'Best First'.
Re: Keys are not adding to registry
by marto (Cardinal) on Apr 04, 2013 at 09:28 UTC

    Works for me, I see the key/value as specified in HKEY_LOCAL_MACHINE\SOFTWARE\dkanagar . Perhaps you're looking in the wrong place.

      are you able to see in the registry editor. i dont find in my registry. do we need any specific permissions or privileges to do this.

        Yes, I can see it in regedit.exe, I also see it via the command line:

        D:\>perl tie.pl D:\>reg query HKLM\SOFTWARE\dkanagar /s HKEY_LOCAL_MACHINE\SOFTWARE\dkanagar Version REG_SZ 1.00

        If you have regedit open before you run the script it won't dynamically update when changes are made. 'View'->'Refresh' or the F5 key will refresh it for you.

Re: Keys are not adding to registry
by Anonymous Monk on Apr 04, 2013 at 09:30 UTC

    but dont find keys in the registry.

    How are you checking? What does the following return?

    reg query HKLM\SOFTWARE\dkanagar /s

Re: Keys are not adding to registry
by prashantktyagi (Scribe) on Apr 04, 2013 at 11:27 UTC
    working for me too. OS: Win7 with Perl5.14