From: Bram Date: Sun, 27 Apr 2008 21:36:57 +0000 (+0200) Subject: doc patch for perlfunc/split (was: RE: [perl #46073] split X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8241c1c0382dd31d3def3db892c79428fb5ea2fc;p=p5sagit%2Fp5-mst-13.2.git doc patch for perlfunc/split (was: RE: [perl #46073] split Message-ID: <20080427213657.mowrap5cgc0o00kc@horde.wizbit.be> p4raw-id: //depot/perl@33759 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 6af9f8d..7e7692e 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -5445,7 +5445,7 @@ a null pattern C, which is just one member of the set of patterns matching a null string) will split the value of EXPR into separate characters at each point it matches that way. For example: - print join(':', split(/ */, 'hi there')); + print join(':', split(/ */, 'hi there')), "\n"; produces the output 'h:i:t:h:e:r:e'. @@ -5454,7 +5454,7 @@ 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')), "\n"; produces the output 'h:i: :t:h:e:r:e'. @@ -5469,8 +5469,8 @@ hand, are produced when there is a match at the end of the string (and when LIMIT is given and is not 0), regardless of the length of the match. For example: - print join(':', split(//, 'hi there!', -1)); - print join(':', split(/\W/, 'hi there!', -1)); + print join(':', split(//, 'hi there!', -1)), "\n"; + print join(':', split(/\W/, 'hi there!', -1)), "\n"; produce the output 'h:i: :t:h:e:r:e:!:' and 'hi:there:', respectively, both with an empty trailing field.