in reply to Some regex magic

Another suggestion, orthogonal to those given so far, is to obtain your data directly from the Windows registry. There are various modules to do this, although I have had most luck with Win32::TieRegistry.