http://qs321.pair.com?node_id=1004634

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

I have a laptop running WinXP and non-clustered server running Wndows 2008 R2 Enterprise (64-bit). Both are running ActiveState Perl, v5.12.4 on the laptop; v5.8.something on the server. (Sorry I can't be more precise, I failed to capture that data when I was on the server and can't re-connect to it right now.) On my laptop, the following runs just fine, showing the keys under each path:
my $hKey; foreach my $path ("SOFTWARE", "SOFTWARE\\Microsoft", "SOFTWARE\\Microsoft\\Microsoft SQL Server", "SOFTWARE\\Microsoft\\Microsoft SQL Server\\Instance Names",) { warn "path = $path\n"; $::HKEY_LOCAL_MACHINE->Open($path, $hKey) or die $^E; my @array; $hKey->GetKeys(\@array); warn join(', ', @array), "\n"; }
On the server, the first three paths work, but the third one doesn't show an Instance Names key and the last path returns a "not found" error. If I fire up regedit or regedt32, then all of the paths are present, but there are differences in the displayed sub-keys; the most notable is that the Instance Names key exists but the script shows, for example, the ActiveState key under the top level SOFTWARE path, but regedit doesn't; furthermore, using regedit's Find function doesn't find an ActiveState key anywhere. I can't figure out what's going on. Can anyone please help?

UPDATE: Re-writing to use Win32::TieRegistry did nothing. Upgrading the server to use ActiveState Perl 5.16.1, however, fixed everything.