use Win32::Registry; my $Register = "Software"; my ($hkey, @key_list, $key); $HKEY_LOCAL_MACHINE->Open($Register,$hkey)|| die $!; $hkey->GetKeys(\@key_list); print "$Register keys\n"; foreach $key (@key_list) { print "$key\n"; } $hkey->Close();