in reply to Re: how to detect whether script is being run on Windows at runtime?
in thread how to detect whether script is being run on Windows at runtime?

$^O

$^O is determined when perl is compiled. It's the platform perl was compiled on, and that isn't necessarily the platform it runs on.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Re: how to detect whether script is being run on Windows at runtime?

Replies are listed 'Best First'.
Re: Re: Re: how to detect whether script is being run on Windows at runtime?
by Fletch (Bishop) on May 10, 2004 at 18:56 UTC

    True, but perlport also gives a snippet using Win32::GetOSVersion() to distinguish between different flavours thereof.