develooper Front page | perl.perl6.language | Postings from September 2008

Re: Split with negative limits, and other weirdnesses

Thread Previous | Thread Next
From:
Mark J. Reed
Date:
September 29, 2008 19:19
Subject:
Re: Split with negative limits, and other weirdnesses
Message ID:
f60fe000809291919p4a82fb10i25d336afa1202578@mail.gmail.com
On Mon, Sep 29, 2008 at 9:36 PM, Kealey, Martin, ihug-NZ
<Martin.Kealey@vodafone.com> wrote:
> Hmmm, my understanding was that it stopped *splitting* after the limit, but it doesn't stop "consuming" the source;

D'oh, you are of course correct; that is in fact the chief utility of
the limit parameter, and I can't believe I misremembered.  I was even
indignant not too long ago when using some other language/library
which had a split that behaved as I described instead of as it does in
Perl.  Javascript, I believe.

Please excuse the cerebroflatulence.

-- 
Mark J. Reed <markjreed@gmail.com>

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