Help for this page

Select Code to Download


  1. or download this
    my ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell,
    + $expire) = getpwnam($login);
    
  2. or download this
    use User::pwent; # <-- replace getpwnam() and friends with functions r
    +eturning objects
    my $rec = getpwnam($login);
    say $rec->name,' has UID ',$rec->uid,', home ',$rec->dir,', shell ',$r
    +ec->shell;