|Perl Language Reference Manual|
by Larry Wall and others
Paperback (6"x9"), 724 pages
RRP £29.95 ($39.95)
Sales of this book support The Perl Foundation! Get a printed copy>>>
The effective gid of this process. If you are on a machine that supports membership in multiple groups simultaneously, gives a space separated list of groups you are in. The first number is the one returned by getegid(), and the subsequent ones by getgroups(), one of which may be the same as the first number.
Similarly, a value assigned to
$) must also be a space-separated
list of numbers. The first number sets the effective gid, and
the rest (if any) are passed to setgroups(). To get the effect of an
empty list for setgroups(), just repeat the new effective gid; that is,
to force an effective gid of 5 and an effectively empty setgroups()
$) = "5 5" .
You can change both the effective gid and the real gid at the same time by using POSIX::setgid() (use only a single numeric argument). Changes to $) require a check to $! to detect any possible errors after an attempted change.
(Mnemonic: parentheses are used to group things. The effective gid is the group that's right for you, if you're running setgid.)
$) can be set only on
machines that support the corresponding set[re][ug]id() routine.
$) can be swapped only on machines supporting setregid().
|ISBN 9781906966027||Perl Language Reference Manual||See the print edition|