From: Rafael Garcia-Suarez Date: Wed, 18 Oct 2006 14:34:26 +0000 (+0000) Subject: Document _ prototype in perlsub X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=859a4967b34787587c974f8bf025c16c1346ea14;p=p5sagit%2Fp5-mst-13.2.git Document _ prototype in perlsub p4raw-id: //depot/perl@29038 --- diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 4c7dcd6..47ea666 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 is parsed as a true list operator, C is parsed as a true unary operator with unary