On 7/27/07, snickwad <[EMAIL PROTECTED]> wrote:
snip
> Not sure of the installation details, as perldoc does nothing.
snip
Happily, you can read it online: http://perldoc.perl.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.or
Thanks for the resonses and apologies for the lack of script, and the
glaring typo :
The area of code for the test is currently -
open(ULIST,"/etc/passwd") or die "Could not open /etc/passwd";
@udata=;
close(ULIST);
sub check_details
{
return 1 if (grep(/$user/,@udata));
}
So the script is co
On Jul 26, 7:14 am, [EMAIL PROTECTED] (Snickwad) wrote:
> Apologies if this is a bit noobie,
As a newbie, you may not be aware that Perl comes with a built-in
FAQ. You can see the whole thing by typing at your command window:
perldoc perlfaq
But the specific question you care about is:
$ perldoc
Hi,
Perl has a built in function that do just that:
if (my $username = getpwuid($input_uid)) {
print "Founf the user $username\n";
} else {
print "No user found\n";
}
for help try
perldoc -f getpwent
perldoc -f getpwnam
perldoc -f getpwuid
BFN
Yaron Kahanovitch
- Original Mess
On 7/26/07, snickwad <[EMAIL PROTECTED]> wrote:
Apologies if this is a bit noobie, but I have been left with a short
window to write a tool and I have had no experience with Perl. Very
familiar with Kornshell, and so far my Perl script is going okay.
However, I am struggling to get a test working