From: Rafael Garcia-Suarez Date: Thu, 12 May 2005 08:45:40 +0000 (+0000) Subject: Rework documentation of split(//,...) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de5763b09f57cd1553a966128894c602f4a35b8e;p=p5sagit%2Fp5-mst-13.2.git Rework documentation of split(//,...) p4raw-id: //depot/perl@24450 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d7b9bfa..a428b5f 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -5077,15 +5077,14 @@ characters at each point it matches that way. For example: 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". So, for C, the following are equivalent: +As a special case for C, using the empty pattern C specifically +matches only the null string, and is not be confused with the regular use +of C to mean "the last successful pattern match". So, for C, +the following: print join(':', split(//, 'hi there')); - print join(':', split('', 'hi there')); - -and they produce the output 'h:i: :t:h:e:r:e'. +produces 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