diff options
author | Doug Bell <madcityzen@gmail.com> | 2014-05-13 10:50:41 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-05-29 11:19:02 +1000 |
commit | e10c9f69126aee73022a81a13c15f7b7bc5dce48 (patch) | |
tree | e6fadde12d09f215a95daa5adb76a88ddaf3f67f | |
parent | baacc348d003915eb2eb0fe2118b00c456684c98 (diff) | |
download | perl-e10c9f69126aee73022a81a13c15f7b7bc5dce48.tar.gz |
move given/when ~~ note below item introducing it
The note explaining to use $c ~~ $_ instead of $_ ~~ $c was put under the item
introducing all binary operators, and not the one mentioning the explicit
smartmatch operator.
-rw-r--r-- | pod/perlsyn.pod | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 9ce8b3c7d4..244372c8c2 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -958,6 +958,9 @@ the form C<!/REGEX/>, C<$foo !~ /REGEX/>, or C<$foo !~ EXPR>. A smart match that uses an explicit C<~~> operator, such as C<EXPR ~~ EXPR>. +B<NOTE:> You will often have to use C<$c ~~ $_> because the default case +uses C<$_ ~~ $c> , which is frequentlythe opposite of what you want. + =item Z<>4. A boolean comparison operator such as C<$_ E<lt> 10> or C<$x eq "abc">. The @@ -965,10 +968,6 @@ relational operators that this applies to are the six numeric comparisons (C<< < >>, C<< > >>, C<< <= >>, C<< >= >>, C<< == >>, and C<< != >>), and the six string comparisons (C<lt>, C<gt>, C<le>, C<ge>, C<eq>, and C<ne>). -B<NOTE:> You will often have to use C<$c ~~ $_> because -the default case uses C<$_ ~~ $c> , which is frequently -the opposite of what you want. - =item Z<>5. At least the three builtin functions C<defined(...)>, C<exists(...)>, and |