If you need to be specific, then it might be worth looking at some special
Win32 functions.
Here's a quote from the
relevant perldoc:
Win32::GetOSVersion()
[CORE] Returns the array (STRING, MAJOR, MINOR, BUILD, ID), where the elements are, respectively: An arbitrary descriptive string, the major version number of the operating system, the minor version number, the build number, and a digit indicating the actual operating system. For ID, the values are 0 for Win32s, 1 for Windows 9X and 2 for Windows NT. In scalar context it returns just the ID.
You might also be interested in
this recent snippet which basically formats the output of Win32::GetOSVersion().
- wil