I want to determine which version of Windows I'm on using POSIX::uname
. I know it returns 6.2 on Windows 2012. I found a table of these values, Windows version and corresponding release number but I can't find it anymore. I've been searching the documentation, and I'm not able to run uname on every operating system to test it right now. Does anyone have a link or know which numbers correspond to which version of Windows?
http://perldoc.perl.org/perlport.html
http://perldoc.perl.org/POSIX.html
On Windows, POSIX::uname
obtains its information from GetVersionEx
whose parameter's documentation contains a table.
The Win32 module provides more user-friendly calls.
>perl -MWin32 -E"say Win32::GetOSDisplayName()"
Windows 7 Professional (64-bit) Service Pack 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With