From: Jon Eveland Date: Fri, 11 May 2001 07:36:28 +0000 (-0700) Subject: Re: [PATCH perlfunc.pod] split on an empty string X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=836e0ee7e35832ca4f82f36d3c22b706302034d6;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH perlfunc.pod] split on an empty string Message-ID: <20010511143628.24225.qmail@web10402.mail.yahoo.com> p4raw-id: //depot/perl@10083 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index a38b9ba..a790325 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4433,11 +4433,14 @@ splits on whitespace (after skipping any leading whitespace). Anything matching PATTERN is taken to be a delimiter separating the fields. (Note that the delimiter may be longer than one character.) -If LIMIT is specified and positive, splits into no more than that -many fields (though it may split into fewer). If LIMIT is unspecified -or zero, trailing null fields are stripped (which potential users -of C would do well to remember). If LIMIT is negative, it is -treated as if an arbitrarily large LIMIT had been specified. +If LIMIT is specified and positive, it represents the maximum number +of fields the EXPR will be split into, though the number of fields +returned depends on the number of occurrences of PATTERN within EXPR. +If LIMIT is unspecified or zero, trailing null fields are stripped +(which potential users of C would do well to remember). If LIMIT +is negative, it is treated as if an arbitrarily large LIMIT had been +specified. Note that splitting an EXPR that evaluates to the empty +string always returns the empty list, regardless of the LIMIT specified. A pattern matching the null string (not to be confused with a null pattern C, which is just one member of the set of patterns