Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Getting a GID from /etc/group

by particle (Vicar)
on Mar 25, 2002 at 17:22 UTC ( [id://154152]=note: print w/replies, xml ) Need Help??


in reply to Getting a GID from /etc/group

this one caches, to make future lookups faster...
{ my %gid; sub gid($) { my $group = shift; defined $gid{$group} && return $gid{$group}; my $t = getgrnam($group); $gid{$group} = ${ $t }[2]; return $gid{$group}; } }

~Particle ;Þ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://154152]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (None)
    As of 2024-04-25 03:56 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found