Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: To find OS in perl using API

by Tomte (Priest)
on May 12, 2004 at 12:35 UTC ( [id://352709]=note: print w/replies, xml ) Need Help??


in reply to To find OS in perl using API

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.
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.
Note that this might not be what you want , as it's not the runtime but the build-system of your perl-install.

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus

Replies are listed 'Best First'.
Re: Re: To find OS in perl using API
by eserte (Deacon) on May 12, 2004 at 12:57 UTC
    Note that this might not be what you want , as it's not the runtime but the build-system of your perl-install.
    Nod ... everytime I sent a report via cpan-testers I am surprised that the subject contains "freebsd-4.4" ... my system is already at version 4.9.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://352709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found