|
Posted by Ben Morrow on March 29, 2008, 12:38 pm
Please log in for more thread options
>
> > 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 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
|