The name of the operating system under which this copy of Perl was built, as determined during the configuration process. For examples see"PLATFORMS" in perlport.
The value is identical to$Config{'osname'}
. See alsoConfig and the-V command-line switch documented inperlrun.
In Windows platforms,$^O
is not very helpful: since it is alwaysMSWin32
, it doesn't tell the difference between 95/98/ME/NT/2000/XP/CE/.NET. UseWin32::GetOSName()
or Win32::GetOSVersion() (seeWin32 andperlport) to distinguish between the variants.
This variable was added in Perl 5.003.
Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.
The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.