diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-19 01:21:22 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-19 01:21:22 +0000 |
commit | f7e33566f09bd09e2a30db0e6835322b7f19bbd2 (patch) | |
tree | b6b6487ea87c0ba6bb0412178e3b4b230590625b /pod | |
parent | 7c1f0a780f6c3c384f7ab3ab896781a54a658b5f (diff) | |
download | perl-f7e33566f09bd09e2a30db0e6835322b7f19bbd2.tar.gz |
make failed matches return empty list in list context
p4raw-id: //depot/perl@1542
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlop.pod | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod index 8b73629a7c..c7209fac28 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -774,11 +774,11 @@ I<successfully> matched regular expression is used instead. If the C</g> option is not used, C<m//> in a list context returns a list consisting of the subexpressions matched by the parentheses in the -pattern, i.e., (C<$1>, C<$2>, C<$3>...). (Note that here -C<$1> etc. are also set, and -that this differs from Perl 4's behavior.) If there are no parentheses, -the return value is the list C<(1)> for success or C<('')> upon failure. -With parentheses, C<()> is returned upon failure. +pattern, i.e., (C<$1>, C<$2>, C<$3>...). (Note that here C<$1> etc. are +also set, and that this differs from Perl 4's behavior.) When there are +no parentheses in the pattern, the return value is the list C<(1)> for +success. With or without parentheses, an empty list is returned upon +failure. Examples: |