Help for this page
use POSIX qw(getgroups); # get list of the current groups for this process my @gidlist=getgroups(); # you'd have to translate numeric gid's to # the names here
while ( my($name,$pw,$gid,$members) = getgrent ) { push(@rgids,$gid) if ( grep($_ eq $user,split(/\s+/,$members)) ); }