This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate:
authorNicholas Clark <nick@ccl4.org>
Fri, 30 Jan 2004 20:18:43 +0000 (20:18 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 30 Jan 2004 20:18:43 +0000 (20:18 +0000)
[ 22235]
More punctuation, good.

[ 22248]
Another undocumented use of $_ : with reverse().
p4raw-link: @22248 on //depot/perl: 2d713cbdb46b509890c04ac2e5b1893a8fac1914
p4raw-link: @22235 on //depot/perl: dede81231bb6ec127910ed7dddb6f1aeb0cf28da

p4raw-id: //depot/maint-5.8/perl@22250
p4raw-integrated: from //depot/perl@22249 'edit in' pod/perlfunc.pod
(@22235..)

pod/perlfunc.pod

index fe18a79..13bc6d5 100644 (file)
@@ -770,10 +770,10 @@ another C<open> on it, because C<open> will close it for you.  (See
 C<open>.)  However, an explicit C<close> on an input file resets the line
 counter (C<$.>), while the implicit close done by C<open> does not.
 
-If the file handle came from a piped open C<close> will additionally
-return false if one of the other system calls involved fails or if the
+If the file handle came from a piped open, C<close> will additionally
+return false if one of the other system calls involved fails, or if the
 program exits with non-zero status.  (If the only problem was that the
-program exited non-zero C<$!> will be set to C<0>.)  Closing a pipe
+program exited non-zero, C<$!> will be set to C<0>.)  Closing a pipe
 also waits for the process executing on the pipe to complete, in case you
 want to look at the output of the pipe afterwards, and
 implicitly puts the exit status value of that command into C<$?>.
@@ -4257,6 +4257,8 @@ in the opposite order.
     undef $/;                  # for efficiency of <>
     print scalar reverse <>;   # character tac, last line tsrif
 
+Used without arguments in scalar context, reverse() reverses C<$_>.
+
 This operator is also handy for inverting a hash, although there are some
 caveats.  If a value is duplicated in the original hash, only one of those
 can be represented as a key in the inverted hash.  Also, this has to