slloyd has asked for the wisdom of the Perl Monks concerning the following question:

POSIX has a uname that returns the following:
($sysname, $nodename, $release, $version, $machine) = POSIX::uname();

This seems to work on both Windows and Unix systems. For learning purposes, does anyone know how this function works? Particuarily on windows? Thanks.

Replies are listed 'Best First'.
Re: the POSIX uname function
by BrowserUk (Patriarch) on May 23, 2005 at 19:18 UTC

    Search for "uname" here.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
Re: the POSIX uname function
by dragonchild (Archbishop) on May 23, 2005 at 19:09 UTC
    Have you read the source? Perl code is very available for perusal ...

    • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
    • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"
      I have tried to read the source on cpan but it seems to be compiled into a dll. There is no sub uname in the Posix.pm module..
        You're looking for Posix.xs, located here

        • In general, if you think something isn't in Perl, try it out, because it usually is. :-)
        • "What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?"