Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

(wil) Re: $^O eq 'Win32' is a bad idea.

by wil (Priest)
on Jun 06, 2002 at 10:14 UTC ( [id://172134]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-20 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found