in reply to Re: $^O eq 'Win32' is a bad idea.
in thread use Win2000; and alike

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

Replies are listed 'Best First'.
Re: (wil) Re: Re: $^O eq 'Win32' is a bad idea.
by demerphq (Chancellor) on Jun 06, 2002 at 15:47 UTC
    Not to be snarky Wil but did you look at Determine Windows Type or Version? I dont think the author of the snippet you mention did either.. :-)

    Well, not at first he didnt anyway.

    Yves / DeMerphq
    ---
    Writing a good benchmark isnt as easy as it might look.