Overrides core getpwent, getpwuid, and getpwnam
functions with versions that return User::pwent objects. The object
returned has methods with the same names as the structure fields they
return. That is, to return the field name, use the name
method:
use User::pwent;
$pw = getpwnam('daemon') or die "No daemon user";
if ( $pw->uid == 1 && $pw->dir =~ m#^/(bin|tmp)?$# ) {
    print "gid 1 on root dir";
}pw_ to the method name (for example, pw_name).Exports four functions:

Copyright © 2001 O'Reilly & Associates. All rights reserved.