( categories: special variables )
Note
The name of the underlying operating system is stored in the variable $^O.
Common $^O values
| operating system | $^O value |
| Linux | linux |
| Windows | MSWin32 |
| AIX | aix |
| Solaris | solaris |
Note
The value stored in $^O contains only the name of the operating system, not the release number. To determine the release number, consider using POSIX::uname() from POSIX package.
Example:
#-- don't allow to run on Windows systems
die "Sorry, can't run on Windows\n" if ( $^O eq "MSWin32" );





