From 2d713cbdb46b509890c04ac2e5b1893a8fac1914 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 30 Jan 2004 08:29:55 +0000 Subject: [PATCH] Another undocumented use of $_ : with reverse(). p4raw-id: //depot/perl@22248 --- pod/perlfunc.pod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index f3a0adf..32e33aa 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -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 -- 2.7.4