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

perldoc perlport lists what $^O will be on different platforms.

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

    $^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' }

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