projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2059b7
)
Another undocumented use of $_ : with reverse().
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Fri, 30 Jan 2004 08:29:55 +0000
(08:29 +0000)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Fri, 30 Jan 2004 08:29:55 +0000
(08:29 +0000)
p4raw-id: //depot/perl@22248
pod/perlfunc.pod
patch
|
blob
|
history
diff --git
a/pod/perlfunc.pod
b/pod/perlfunc.pod
index
f3a0adf
..
32e33aa
100644
(file)
--- 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