For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > March 2008 > Re: FAQ 8.1 How do I find out which operating system I'm running









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: FAQ 8.1 How do I find out which operating system I'm running
jm

2008-03-29, 8:07 am



> 8.1: How do I find out which operating system I'm running under?
>
> The $^O variable ($OSNAME if you use English) contains an indication of
> the name of the operating system (not its release number) that your perl
> binary was built for.


Is cygwin an operating system (according to perlport)?

And how can I know what kind of perl I'm running under?

strawberryperl?
activeperl?
cygwinperl?
Ben Morrow

2008-03-29, 7:19 pm


Quoth jm <jm@nospam.fr>:
>
>
> Is cygwin an operating system (according to perlport)?


According to $^O, yes, it is.

> And how can I know what kind of perl I'm running under?
>
> strawberryperl?


Vanilla/Strawberry Perl are no different from a perl built by hand using
MinGW. That's sort-of the point, actually... You can check for
$Config::Config{cc} eq 'gcc' if you need to know this, but be aware
ActivePerl fakes its %Config if you have gcc installed.

> activeperl?


ActivePerl defines the builtin Win32::BuildNumber, so you can test for
ActivePerl with defined &Win32::BuildNumber.

> cygwinperl?


$^O eq 'cygwin'

Ben

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com