Another undocumented use of $_ : with reverse().
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 30 Jan 2004 08:29:55 +0000 (08:29 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 30 Jan 2004 08:29:55 +0000 (08:29 +0000)
p4raw-id: //depot/perl@22248

pod/perlfunc.pod

index f3a0adf..32e33aa 100644 (file)
@@ -4254,6 +4254,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