summaryrefslogtreecommitdiff
path: root/pod/perlsub.pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-18 14:34:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-18 14:34:26 +0000
commit859a4967b34787587c974f8bf025c16c1346ea14 (patch)
treeab178ed0b44c5c1733d2106d244f29e30f9eb1fa /pod/perlsub.pod
parentd822fdf9523774354b4abafec1aa0c8639788575 (diff)
downloadperl-859a4967b34787587c974f8bf025c16c1346ea14.tar.gz
Document _ prototype in perlsub
p4raw-id: //depot/perl@29038
Diffstat (limited to 'pod/perlsub.pod')
-rw-r--r--pod/perlsub.pod5
1 files changed, 4 insertions, 1 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index 4c7dcd6209..47ea666fc2 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -1098,9 +1098,12 @@ follows:
...
}
-A semicolon separates mandatory arguments from optional arguments.
+A semicolon (C<;>) separates mandatory arguments from optional arguments.
It is redundant before C<@> or C<%>, which gobble up everything else.
+As the last character of a prototype, you can use C<_> in place of C<$>:
+if this argument is not provided, C<$_> will be used instead.
+
Note how the last three examples in the table above are treated
specially by the parser. C<mygrep()> is parsed as a true list
operator, C<myrand()> is parsed as a true unary operator with unary