develooper Front page | perl.perl5.porters | Postings from July 2009

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
From:
Offer Kaye
Date:
July 10, 2009 23:11
Subject:
Re: [PATCH] Remove implicit split to @_
Message ID:
5694250907102311o755754ffp7fb5d42231557506@mail.gmail.com
On Sat, Jul 11, 2009 at 2:55 AM, Yitzchak Scott-Thoennes wrote:
>
> Already there, http://perldoc.perl.org/functions/split.html:
>
> split /PATTERN/,EXPR,LIMIT...If LIMIT is specified and positive, it
> represents the maximum number of fields the EXPR will be split into...If
> LIMIT is negative, it is treated as if an arbitrarily large LIMIT had been
> specified...When assigning to a list, if LIMIT is omitted, or zero, Perl
> supplies a LIMIT one larger than the number of variables in the list
>
> although I'm not quite certain what the "this" you meant is.
>
>

Probably the fact that the line without the limit returns "1" instead
of the count, even though the documentation seems to imply both lines
should have worked the same in this case. At least as far as I
understood them.

-- 
Offer Kaye

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About