Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are different possible values for POSIX::uname() release number on Windows?

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

like image 262
hmatt1 Avatar asked Oct 20 '13 19:10

hmatt1


1 Answers

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
like image 75
ikegami Avatar answered Oct 07 '22 19:10

ikegami