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

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
From:
Eric Brine
Date:
July 13, 2009 13:16
Subject:
Re: [PATCH] Remove implicit split to @_
Message ID:
f86994700907131316w604e06afob40136e22007e827@mail.gmail.com
On Fri, Jul 10, 2009 at 7:55 PM, Yitzchak Scott-Thoennes
<sthoenna@efn.org>wrote:

> On Fri, July 10, 2009 11:12 am, Eric Brine wrote:
> > On Fri, Jul 10, 2009 at 1:45 PM, Yitzchak Scott-Thoennes wrote:
> >> $count = () = split(/PATTERN/, EXPR) doesn't work, but
> >> $count = () = split(/PATTERN/, EXPR, -1) does.
> >
> > Could this be added to the docs, please?
>
> Already there, http://perldoc.perl.org/functions/split.html:

...

> although I'm not quite certain what the "this" you meant is.


An example of how to count fields using split. That's heavy reading to find
out a common idiom doesn't work with split. I believe it's singular in this
optimisation.

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