in reply to Current Operating System

print $^O;

I am not sure how to print the distro though, if that is what you meant.

<(^.^-<) <(-^.^<) <(-^.^-)> (>^.^-)> (>-^.^)>

Replies are listed 'Best First'.
Re^2: Current Operating System
by regexes (Hermit) on Aug 07, 2008 at 08:57 UTC
    Hello,

    FYI... do be aware of the "pitfall" of $^0, i.e. it's the architecture that copy of perl was built on, not necessarily what you're running on. See Re: OS400 Pace - architecture?

    regexes


    -------------------------
    Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan "press on" has solved and always will solve the problems of the human race.
    -- Calvin Coolidge, 30th President of the USA.
Re^2: Current Operating System
by ganilmohan (Acolyte) on Aug 07, 2008 at 05:05 UTC
    Thanks. It displays only the OS. Can I get the information along with the version as well?
      Can I get the information along with the version as well?

      If you know that you are on Solaris (as opposed to, say, Windoze), you could shell out and do a uname -r

      -- 
      Ronald Fischer <ynnor@mm.st>