Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 178501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:14:31+00:00 2026-05-11T14:14:31+00:00

Using Cygwin Perl v5.8.8 and Win32::TieRegistry 0.26. We can get a tied hash object

  • 0

Using Cygwin Perl v5.8.8 and Win32::TieRegistry 0.26.

We can get a tied hash object thing for HKEY_CURRENT_USER:

$ perl -e ' my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); use Data::Dumper; my $Key = $RegHash{'HKEY_CURRENT_USER'}; print Dumper $Key;' $VAR1 = bless( {}, 'Win32::TieRegistry' ); 

And this works for sub keys:

$ perl -e ' my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); use Data::Dumper; my $Key = $RegHash{'HKEY_CURRENT_USER\\Software'}; print Dumper $Key;' $VAR1 = bless( {}, 'Win32::TieRegistry' ); 

And we can print information for the key:

$ perl -e ' my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); use Data::Dumper; my $Key = $RegHash{'HKEY_CURRENT_USER\\Software'}; print Dumper $Key->Information;' $VAR1 = 'CntSubKeys'; $VAR2 = 48; $VAR3 = 'MaxSubClassLen'; $VAR4 = 21; ... 

However the documentation implies we can list the sub keys simply by treating it as a hash:

$ perl -e ' my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); use Data::Dumper; my $Key = $RegHash{'HKEY_CURRENT_USER\\Software'}; print Dumper keys %$Key; ' 

But the array is empty. Is it broken or am I doing something wrong? Is there another way to list the sub keys?

This doesn’t work either:

$ perl -e ' my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); use Data::Dumper; my $Key = $RegHash{'HKEY_CURRENT_USER\\Software'}; print Dumper $Key->SubKeyNames;' Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/vendor_perl/5.8/cygwin/Win32/TieRegistry.pm line 720. 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:14:32+00:00Added an answer on May 11, 2026 at 2:14 pm

    With your code:

    my %RegHash; use Win32::TieRegistry( TiedHash => \%RegHash ); use Data::Dumper; my $Key = $RegHash{'HKEY_CURRENT_USER\\Software'}; print Dumper keys %$Key; 

    I get this result on my machine (WinXP, ActiveState Perl v5.10.0, Win32-TieRegistry 0.25):

    $VAR1 = 'Adobe\\'; ... $VAR101 = 'Classes\\'; $VAR102 = '\\'; 

    and this is what I get with your second code sample:

    $VAR1 = 'Adobe'; ... $VAR101 = 'Classes'; 

    So both of your code samples work okay, on ActiveState Perl and Windows XP at least.

    EDIT: This looks like a more general problem/bug:

    • TieRegistry module fails to enumerate values on community.activestate.com
    • Win32::TieRegistry Error (or is it me?) on prlmnks.org
    • a blog post on weblog.siliconcerebrate.com
    • the whole thing seems to be related to Windows Vista
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Windows, using Cygwin: How can I get the shebang line in a shell
I am using cygwin to get unix environment on windows. I have some shell
I want to get the process memory Info in C. I am using Cygwin
I'm trying to run genhtml using perl.exe from Cygwin in Windows. I have installed
I am running a Eclipse for C/C++ using cygwin GCC. I need to get
I get the following message while trying to ./configure opa_v2980 using Cygwin in Windows
I was using PAR::Packer to package my Perl application on Cygwin and then running
I am currently using Cygwin in Windows. If I use sed to search and
I am using cygwin on Windows 7 . I have a directory with all
I am trying to do ssh connection using cygwin. I have followed instructions given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.