Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: perlport, MSWin32 and ID column

by Courage (Parson)
on Feb 25, 2003 at 13:21 UTC ( #238417=note: print w/replies, xml ) Need Help??

in reply to perlport, MSWin32 and ID column

That piece of doc expains dosish platforms, so it is closely related to Win32::GetOSVersion function.
perldoc Win32 contains an answer to your question:
Win32::GetOSVersion() [CORE] Returns the array (STRING, MAJOR, MINOR, BUILD, ID), where the elements are, respectively: An arbitrary descriptive string, t +he major version number of the operating system, the minor version number, the build number, and a digit indicating the actual operating system. For the ID, the values are 0 for Win32s, 1 for Windows 9X and 2 for Windows NT/2000/XP. In scalar context it returns just the ID. Currently known values for ID MAJOR and MINOR are as follows: OS ID MAJOR MINOR Win32s 0 - - Windows 95 1 4 0 Windows 98 1 4 10 Windows Me 1 4 90 Windows NT 3.51 2 3 51 Windows NT 4 2 4 0 Windows 2000 2 5 0 Windows XP 2 5 1 Windows .NET Server 2 5 1 Unfortunately as of June 2002 there is no way to distinguish betwe +en .NET servers and XP servers without using additional modules.

Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re: Re: perlport, MSWin32 and ID column
by giulienk (Curate) on Feb 25, 2003 at 17:01 UTC
    Thanks, that's exactly what i needed to know.
    Win32::GetOSVersion() in scalar context will get the job done :)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://238417]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-05-06 00:06 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (69 votes). Check out past polls.