X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlvar.pod;h=718484f466b539f64538a6b473a72ecffb6daa6d;hb=a0acbdc36d211b2eba42328df555d9ec49fa4cd4;hp=8b025c5b72c736dacf8261fab8a414bf97d6a6b1;hpb=92d29cee5ff815b05b81b877528e4c77e73881c9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 8b025c5..718484f 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 @@ -191,17 +193,22 @@ examples given for the C<@-> variable. =item $* -Set to 1 to do multi-line matching within a string, 0 to tell Perl -that it can assume that strings contain a single line, for the purpose -of optimizing pattern matches. Pattern matches on strings containing -multiple newlines can produce confusing results when C<$*> is 0. Default -is 0. (Mnemonic: * matches multiple things.) This variable -influences the interpretation of only C<^> and C<$>. A literal newline can -be searched for even when C<$* == 0>. +Set to a non-zero integer value to do multi-line matching within a +string, 0 (or undefined) to tell Perl that it can assume that strings +contain a single line, for the purpose of optimizing pattern matches. +Pattern matches on strings containing multiple newlines can produce +confusing results when C<$*> is 0 or undefined. Default is undefined. +(Mnemonic: * matches multiple things.) This variable influences the +interpretation of only C<^> and C<$>. A literal newline can be searched +for even when C<$* == 0>. Use of C<$*> is deprecated in modern Perl, supplanted by the C and C modifiers on pattern matching. +Assigning a non-numerical value to C<$*> triggers a warning (and makes +C<$*> act if C<$* == 0>), while assigning a numerical value to C<$*> +makes that an implicit C is applied on the value. + =item input_line_number HANDLE EXPR =item $INPUT_LINE_NUMBER @@ -412,6 +419,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 +624,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 +638,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 +661,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 +686,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 +706,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 @@ -814,10 +838,10 @@ Then $^M = 'a' x (1 << 16); -would allocate a 64K buffer for use when in emergency. See the +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