From perldoc -f perlvar
$^O The name of the operating system under which this copy of Perl was built, as determined during the configuration process. The value is identical to $Config{'osname'}. See also Config and the -V command-line switch documented in perlrun.Note that this might not be what you want , as it's not the runtime but the build-system of your perl-install.
In Windows platforms, $^O is not very helpful: since it is always "MSWin32", it doesn't tell the difference between 95/98/ME/NT/2000/XP/CE/.NET. Use Win32::GetOSName() or Win32::GetOSVersion() (see Win32 and perlport) to distinguish between the variants.
regards,
tomte
An intellectual is someone whose mind watches itself.
-- Albert Camus
In reply to Re: To find OS in perl using API
by Tomte
in thread To find OS in perl using API
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |