Since you are on Windows, if you have a EXE or DLL, the majority of them have a version number in them if you right click-properties-version tab. http://search.cpan.org/~jdb/Win32-0.45/Win32.pm#Win32::GetFileVersion(FILENAME) will get you that info API wise. You are using an API from version.dll to get that info. So google version.dll and Perl and maybe you will find more.
in reply to How to get version number of any application installed on box
Trying to extract the version number from MSI or the registry, I dont know about. You are venturing into the COM land.