|
From: jm on 29 Mar 2008 08:41 > 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?
From: Ben Morrow on 29 Mar 2008 12:38 Quoth jm <jm(a)nospam.fr>: > > > 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
|
Pages: 1 Prev: empty variables - getting rid of "uninitialized value" warnings? Next: Memory issues |