Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I referred to the following table a bunch of times, it ought to be posted around here just in case it disappears from

Also mirrored at

Perl $^O values for various operating systems

Compiled from info in perlport - Writing portable Perl (version 1.39, last modified 11 February 1999, maintained by Chris Nandor

<cite>As of version 5.002, Perl is built with a $^O variable that indicates the operating system it was built on. This was implemented to help speed up code that would otherwise have to use Config; and use the value of $Config{'osname'}. Of course, to get detailed information about the system, looking into %Config is certainly recommended.</cite>

<cite>-- perlport</cite>

Last update: 20.05.1999. Send corrections/additions to

Family Common name $^O $Config{'archname'} notes
Unix AIX aix aix
BSD/OS bsdos i386-bsdos
dgux dgux AViiON-dgux
DYNIX/ptx dynixptx i386-dynixptx
FreeBSD freebsd freebsd-i386
Linux linux i386-linux
HP-UX hpux PA-RISC1.1
IRIX irix irix
openbsd openbsd i386-openbsd
OSF1 dec_osf alpha-dec_osf
reliantunix-n svr4 RM400-svr4
SCO_SV sco_sv i386-sco_sv
SINIX-N svr4 RM400-svr4
sn4609 unicos CRAY_C90-unicos
sn9617 CRAY_J90-unicos
sn6521 unicosmk t3e-unicosmk
SunOS solaris sun4-solaris
SunOS4 sunos   sun4-sunos
Unix?   netbsd  
OS/2 os2
Windows 95 MSWin32 MSWin32-x86 Win32::IsWin95 == 1
Windows 98
Win32::IsWin95 == 1<br> &amp;&amp; hex $build == 1998;

$build = (unpack &quot;A4&quot;x2, sprintf &quot;%08X&quot;, (&amp;Win32::GetOSVersion)[3])[1];
Windows NT Win32::IsWinNT == 1
Mac Mac OS MacOS MacOS_PPC
Mac OS X Server rhapsody    
  OpenVMS VMS   To determine the architecture that you are running on without resorting to loading all of %Config you can examine the content of the @INC array.
Alpha: grep(/VMS_AXP/, @INC) Vax: grep(/VMS_VAX/, @INC)

See perlport for details.

  VOS VOS   To determine the architecture that you are running on without resorting to loading all of %Config you can examine the content of the @INC array.
Stratus: grep(/VOS/, @INC) Stratus XA: grep(/860/, @INC) Stratus HP 7100 or 8000: grep(/7100/, @INC) Stratus HP 8000: grep(/8000/, @INC)

See perlport for details.

EBCDIC OS/390 os390
VM/ESA vmesa
  Acorn RISC OS riscos
  Amiga amigaos    
  BeOS beos    
  Plan 9      
  Mach Ten machten    
  MPE/iX mpeix PA-RISC1.1  

Last update: 20.05.1999. Send corrections/additions to

MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.

In reply to Perl $^O values for various operating systems by PodMaster
in thread OS Info by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (2)
    As of 2021-01-20 01:36 GMT
    Find Nodes?
      Voting Booth?