use Win32::TieRegistry Delimiter => '/'; # # Here is the 'path' to the key in the registry. Here it is # set to look at the EventLog key. # my $name = join '/', qw/ LMachine System CurrentControlSet Services EventLog /; my $key = $Registry->{$name} or die "$0: can't open $name: $^E\n"; my(@subs,@vals); for (keys %$key) { print "$_\n"; if (m<^/(.*)$>s) { push @vals, $1; } elsif (m<^(.*)/$>s) { push @subs, $1; } } # # Run against other registry keys this prints out subkeys # and values. For EventLog, it only prints out values. # print "Subkeys of $name:\n", map( "$_\n", @subs), "Values of $name:\n", map( "$_=$key->{$_}\n", @vals);