start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: getpwent Chapter 5
Function Reference
Next: Reference: getpwuid
 

getpwnam

getpwnam 
name

Retrieves the passwd file entry of a user, name . The return value in list context is:

($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell)
If you want to do this repeatedly, consider caching the data in a hash using getpwent .

In scalar context, getpwnam returns only the numeric user ID.


Previous: Reference: getpwent Perl in a Nutshell Next: Reference: getpwuid
Reference: getpwent Book Index Reference: getpwuid