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

In my script I would like to detect whether it's running on Windows or not.

Sys::Hostname

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

Replies are listed 'Best First'.
Re: Re: how to detect whether script is being run on Windows at runtime?
by vek (Prior) on May 10, 2004 at 20:00 UTC

    I think all Sys::Hostname does is tell you the hostname of the machine. Doesn't tell you what OS the machine is running.

    -- vek --
      Whoops! My mistake. Try this from usenet:

      use Config; $ostype = $Config{"osname"};