Re: FAQ 8.1 How do I find out which operating system I"m runningunder?

Re: FAQ 8.1 How do I find out which operating system I"m runningunder?

am 29.03.2008 13:41:01 von JM

> 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?

Re: FAQ 8.1 How do I find out which operating system I"m runningunder?

am 29.03.2008 17:38:51 von Ben Morrow

Quoth jm :
>
> > 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)?

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