andreas1234567 has asked for the wisdom of the Perl Monks concerning the following question:
$ perldoc -f chown ($login,$pass,$uid,$gid) = getpwnam($user) or die "$user not in passwd file";
Thanks.$ perl --version This is perl, v5.8.5 built for i386-linux-thread-multi $ uname -a Linux hopalong 2.6.9-42.0.10.EL #1 Tue Feb 27 09:24:42 EST 2007 i686 i +686 i386 GNU/Linux $ perl -wle 'use strict; my (undef,undef,$uid,$gid) = getpwnam(q[roo]) + || die "oh no"; print $uid;' Use of uninitialized value in print at -e line 1. $ perl -wle 'use strict; my (undef,undef,$uid,$gid) = getpwnam(q[roo]) + or die "oh no"; print $uid;' 500
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: || vs or
by mickeyn (Priest) on May 16, 2007 at 06:51 UTC | |
|
Re: || vs or
by FunkyMonk (Bishop) on May 16, 2007 at 08:24 UTC | |
by Krambambuli (Curate) on May 16, 2007 at 09:33 UTC | |
|
Re: || vs or
by Krambambuli (Curate) on May 16, 2007 at 08:30 UTC | |
|
Re: || vs or
by cdarke (Prior) on May 16, 2007 at 07:39 UTC | |
|
Re: || vs or
by Tanktalus (Canon) on May 16, 2007 at 17:22 UTC | |
|
Re: || vs or
by davido (Cardinal) on May 16, 2007 at 20:38 UTC | |
by TimToady (Parson) on May 16, 2007 at 21:14 UTC |