summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perlfunc.pod16
-rw-r--r--pod/perlsyn.pod3
2 files changed, 14 insertions, 5 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 81a42c2ab3..d7b9bfa683 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -5079,12 +5079,18 @@ produces the output 'h:i:t:h:e:r:e'.
Using the empty pattern C<//> specifically matches the null string, and is
not be confused with the use of C<//> to mean "the last successful pattern
-match".
+match". So, for C<split>, the following are equivalent:
-Empty leading (or trailing) fields are produced when there are positive width
-matches at the beginning (or end) of the string; a zero-width match at the
-beginning (or end) of the string does not produce an empty field. For
-example:
+ print join(':', split(//, 'hi there'));
+
+ print join(':', split('', 'hi there'));
+
+and they produce the output 'h:i: :t:h:e:r:e'.
+
+Empty leading (or trailing) fields are produced when there are positive
+width matches at the beginning (or end) of the string; a zero-width match
+at the beginning (or end) of the string does not produce an empty field.
+For example:
print join(':', split(/(?=\w)/, 'hi there!'));
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index aabd65d212..3d45d55f52 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -105,6 +105,9 @@ as the last item in a statement.
The number 0, the strings C<'0'> and C<''>, the empty list C<()>, and
C<undef> are all false in a boolean context. All other values are true.
+Negation of a true value by C<!> or C<not> returns a special false value.
+When evaluated as a string it is treated as C<''>, but as a number, it
+is treated as 0.
=head2 Statement Modifiers