X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlvar.pod;h=49cdcb273e6973eee61af3364ab9484b67726ca5;hb=7817ba4dfeb754838a0da8f159127895c2dcf4fc;hp=4ad8d1248f7cb313bec3c1d3aed6ad5c59589b1e;hpb=51ee650079cd7ef6a0ae6b587f0db512c6cfacde;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 4ad8d12..49cdcb2 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -174,6 +174,8 @@ example: (Mnemonic: be positive and forward looking.) This variable is read-only and dynamically scoped to the current BLOCK. +=item @LAST_MATCH_END + =item @+ This array holds the offsets of the ends of the last successful @@ -412,6 +414,8 @@ channel. Used with formats. (Mnemonic: lines_on_page - lines_printed.) +=item @LAST_MATCH_START + =item @- $-[0] is the offset of the start of the last successful match. @@ -615,7 +619,8 @@ across fork() calls. (Mnemonic: same as shells.) =item $< The real uid of this process. (Mnemonic: it's the uid you came I, -if you're running setuid.) +if you're running setuid.) You can change both the real uid and +the effective uid at the same time by using POSIX::setuid(). =item $EFFECTIVE_USER_ID @@ -628,6 +633,9 @@ The effective uid of this process. Example: $< = $>; # set real to effective uid ($<,$>) = ($>,$<); # swap real and effective uid +You can change both the effective uid and the real uid at the same +time by using POSIX::setuid(). + (Mnemonic: it's the uid you went I, if you're running setuid.) C<< $< >> and C<< $> >> can be swapped only on machines supporting setreuid(). @@ -648,6 +656,9 @@ However, a value assigned to C<$(> must be a single number used to set the real gid. So the value given by C<$(> should I be assigned back to C<$(> without being forced numeric, such as by adding zero. +You can change both the real gid and the effective gid at the same +time by using POSIX::setgid(). + (Mnemonic: parentheses are used to I things. The real gid is the group you I, if you're running setgid.) @@ -670,6 +681,9 @@ empty list for setgroups(), just repeat the new effective gid; that is, to force an effective gid of 5 and an effectively empty setgroups() list, say C< $) = "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). + (Mnemonic: parentheses are used to I things. The effective gid is the group that's I for you, if you're running setgid.) @@ -687,6 +701,11 @@ program sees. This is more useful as a way of indicating the current program state than it is for hiding the program you're running. (Mnemonic: same as B and B.) +Note for BSD users: setting C<$0> does not completely remove "perl" +from the ps(1) output. For example, setting C<$0> to C<"foobar"> will +result in C<"perl: foobar (perl)">. This is an operating system +feature. + =item $[ The index of the first element in an array, and of the first character @@ -817,7 +836,7 @@ Then would allocate a 64K buffer for use in an emergency. See the F file in the Perl distribution for information on how to enable this option. To discourage casual use of this advanced -feature, there is no L long name for this variable. +feature, there is no L long name for this variable. =item $OSNAME