X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlvar.pod;h=7c61a050960724bfdf9d5c8fb4f5bafa34a7badb;hb=3dc608da20ed2bfc3a3adc9459ee35d5fa2839b3;hp=f39ac7da2cb25a83fc21455ef96db3b2933c87ae;hpb=803059618a6e90fb614193e8cdf81c79f27d8764;p=p5sagit%2Fp5-mst-13.2.git
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index f39ac7d..7c61a05 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -58,14 +58,14 @@ the change may affect other modules which rely on the default values
of the special variables that you have changed. This is one of the
correct ways to read the whole file at once:
- open my $fh, "foo" or die $!;
+ open my $fh, "<", "foo" or die $!;
local $/; # enable localized slurp mode
my $content = <$fh>;
close $fh;
But the following code is quite bad:
- open my $fh, "foo" or die $!;
+ open my $fh, "<", "foo" or die $!;
undef $/; # enable slurp mode
my $content = <$fh>;
close $fh;
@@ -81,7 +81,7 @@ inside some short C<{}> block, you should create one yourself. For
example:
my $content = '';
- open my $fh, "foo" or die $!;
+ open my $fh, "<", "foo" or die $!;
{
local $/;
$content = <$fh>;
@@ -148,18 +148,24 @@ don't use it:
=item *
-Various unary functions, including functions like ord() and int(), as well
-as the all file tests (C<-f>, C<-d>) except for C<-t>, which defaults to
-STDIN.
+The following functions:
+
+abs, alarm, chomp, chop, chr, chroot, cos, defined, eval, exp, glob,
+hex, int, lc, lcfirst, length, log, lstat, mkdir, oct, ord, pos, print,
+quotemeta, readlink, readpipe, ref, require, reverse (in scalar context only),
+rmdir, sin, split (on its second argument), sqrt, stat, study, uc, ucfirst,
+unlink, unpack.
=item *
-Various list functions like print() and unlink().
+All file tests (C<-f>, C<-d>) except for C<-t>, which defaults to STDIN.
+See L
+
=item *
-The pattern matching operations C, C, and C
when used
-without an C<=~> operator.
+The pattern matching operations C, C and C
(aka C)
+when used without an C<=~> operator.
=item *
@@ -172,6 +178,10 @@ The implicit iterator variable in the grep() and map() functions.
=item *
+The implicit variable of given().
+
+=item *
+
The default place to put an input record when a C<< >>
operation's result is tested by itself as the sole criterion of a C
test. Outside a C test, this will not happen.
@@ -181,7 +191,7 @@ test. Outside a C test, this will not happen.
As C<$_> is a global variable, this may lead in some cases to unwanted
side-effects. As of perl 5.9.1, you can now use a lexical version of
C<$_> by declaring it in a file or in a block with C. Moreover,
-declaring C restores the global C<$_> in the current scope.
+declaring C restores the global C<$_> in the current scope.
(Mnemonic: underline is understood in certain operations.)
@@ -231,7 +241,7 @@ See L@-> for a replacement.
=item ${^MATCH}
X<${^MATCH}>
-This is similar to C<$&> (C<$POSTMATCH>) except that it does not incur the
+This is similar to C<$&> (C<$MATCH>) except that it does not incur the
performance penalty associated with that variable, and is only guaranteed
to return a defined value when the pattern was compiled or executed with
the C
modifier.
@@ -302,6 +312,8 @@ matched. For example:
(Mnemonic: be positive and forward looking.)
This variable is read-only and dynamically scoped to the current BLOCK.
+=item $LAST_SUBMATCH_RESULT
+
=item $^N
X<$^N>
@@ -337,6 +349,8 @@ past where $2 ends, and so on. You can use C<$#+> to determine
how many subgroups were in the last successful match. See the
examples given for the C<@-> variable.
+=item %LAST_PAREN_MATCH
+
=item %+
X<%+>
@@ -431,7 +445,7 @@ instead of lines, with the maximum record size being the referenced
integer. So this:
local $/ = \32768; # or \"32768", or \$var_containing_32768
- open my $fh, $myfile or die $!;
+ open my $fh, "<", $myfile or die $!;
local $_ = <$fh>;
will read a record of no more than 32768 bytes from FILE. If you're
@@ -467,7 +481,8 @@ buffered otherwise. Setting this variable is useful primarily when
you are outputting to a pipe or socket, such as when you are running
a Perl program under B and want to see the output as it's
happening. This has no effect on input buffering. See L
-for that. (Mnemonic: when you want your pipes to be piping hot.)
+for that. See L on how to select the output channel.
+See also L. (Mnemonic: when you want your pipes to be piping hot.)
=item IO::Handle->output_field_separator EXPR
@@ -764,8 +779,7 @@ X<$^ENCODING>
The I