use strict; use warnings; open my $regFH, q{<}, \ <<'EOD' or die qq{open: << HEREDOC: $!\n}; Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] "DisplayName"="" "UninstallString"="C:\\PROGRA~1\\CISCOS~1\\VPNCLI~1\\Profiles\\PROGRA~1\\CISCOS~1\\VPNCLI~1\\profiles\\UNWISE.EXE C:\\PROGRA~1\\CISCOS~1\\VPNCLI~1\\Profiles\\PROGRA~1\\CISCOS~1\\VPNCLI~1\\profiles\\INSTALL.LOG" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AddressBook] @="" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe SVG Viewer] "DisplayName"="Adobe SVG Viewer 3.0" "DisplayVersion"=" 3.0" "DisplayIcon"="C:\\Program Files\\Common Files\\Adobe\\SVG Viewer 3.0\\Uninstall\\SetupRsrc.dll,-200" "VersionMajor"=dword:00000003 "VersionMinor"=dword:00000000 "InstallLocation"="C:\\WINDOWS\\system32\\Adobe\\SVG Viewer 3.0" "UninstallString"="C:\\Program Files\\Common Files\\Adobe\\SVG Viewer 3.0\\Uninstall\\Winstall.exe -u -fC:\\Program Files\\Common Files\\Adobe\\SVG Viewer 3.0\\Uninstall\\Install.log" "UninstallDir"="C:\\Program Files\\Common Files\\Adobe\\SVG Viewer 3.0\\Uninstall" "Publisher"="Adobe Systems, Inc." "RegCompany"="Adobe Systems Inc" "URLInfoAbout"="http://www.adobe.com/" "URLUpdateInfo"="http://www.adobe.com/svg/main.html" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Artemis 7.2.1 ODBC] "NoRemove"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Standalone] "UninstallString"="C:\\WINDOWS\\IsUninst.exe -f\"C:\\Program Filesone.isu\"" "DisplayName"="This is-not SHOWING" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\exampler] "DisplayName"="Example Display Name" "UninstallString"="c:\\applications\\uninst.exe" "DisplayVersion"="v7.5.2" "URLInfoAbout"="http://something.htm" "Publisher"="NOT caught" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Branding] "QuietUninstallString"="Rundll32 IedkCS32.dll,BrandCleanInstallStubs" "RequiresIESysFile"="100.0" EOD { local $/ = q{}; while( <$regFH> ) { next unless m{^\[HKEY}; my $displayName = m{"DisplayName"="([^"]+)} ? do { my $s = $1; $s =~ s{^\s+}{}; $s =~ s{\s+$}{}; $s; } : q{Not found!}; my $displayVersion = m{"DisplayVersion"="([^"]+)} ? do { my $s = $1; $s =~ s{^\s+}{}; $s =~ s{\s+$}{}; $s; } : q{Not found!}; my $publisher = m{"Publisher"="([^"]+)} ? do { my $s = $1; $s =~ s{^\s+}{}; $s =~ s{\s+$}{}; $s; } : q{Not found!}; print qq{Name: $displayName\n}, qq{Version: $displayVersion\n}, qq{Publisher: $publisher\n\n}; } } close $regFH or die qq{close: << HEREDOC: $!\n};