in reply to Determining real name from login name

Erm. Would you care to tell us your OS? This ain't an Operating System Xxx mailing list. Don't asume everyone uses the same OS you do.

Jenda
We'd like to help you learn to help yourself
Look around you, all you see are sympathetic eyes
Stroll around the grounds until you feel at home
   -- P. Simon in Mrs. Robinson

  • Comment on Re: Determining real name from login name

Replies are listed 'Best First'.
Re^2: Determining real name from login name
by Brutha (Friar) on Dec 01, 2004 at 14:09 UTC
    This is a good hint, if you try that with Windows and Active Perl 5.6.x you get:

    The getpwnam function is unimplemented at -e line 1.

    And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
    (Terry Pratchett, Small Gods)

Re^2: Determining real name from login name
by loris (Hermit) on Dec 02, 2004 at 08:58 UTC

    Hello,

    Thanks for the advice. Sorry for not mentioning the OS - it's SunOS 5.8.

    I looked at http://www.perldoc.com/perl5.8.4/pod/func/getpwnam.html, where I found

    ($name,$passwd,$uid,$gid, $quota,$comment,$gcos,$dir,$shell,$expire) = getpw*;

    but I don't understand what the star means and it seemed to cause a syntax error. Can anyone enlighten me here?

    I did though manage to solve my problem with

    my ($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell,$expire) = getpwnam($loginName);

    Thanks again for the help,

    loris