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

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
Peter Scott
July 10, 2009 10:03
Re: [PATCH] Remove implicit split to @_
Message ID:
At 08:55 AM 7/10/2009, Chas. Owens wrote:
>On Fri, Jul 10, 2009 at 10:39, Peter Scott<> wrote:
> > I don't get it.  The docs say that scalar split returns the number of
> > elements.  That's useful and convenient, and more intuitive than some of
> > the alternative gyrations that have been suggested.  No one cares about it
> > shoving the contents in @_ or wants that to continue, especially since it
> > results in a warning.  So why can't we make it return the number of
> > elements without either populating @_ or generating a warning?
>The question is when do you want to know how many items a string can
>be split into without actually splitting the line?  If you are going
>to split the line, then you can ask the array how many elements it

It's come up often enough for me that I posted about this very topic a 
year ago:

wherein you'll find one good example of its use.

Peter Scott
Pacific Systems Design Technologies

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About