From 859a4967b34787587c974f8bf025c16c1346ea14 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 18 Oct 2006 14:34:26 +0000 Subject: [PATCH] Document _ prototype in perlsub p4raw-id: //depot/perl@29038 --- pod/perlsub.pod | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.7.4