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

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
Yitzchak Scott-Thoennes
July 10, 2009 10:45
Re: [PATCH] Remove implicit split to @_
Message ID:
On Fri, July 10, 2009 8:23 am, Ben Morrow wrote:
> Since it took me a minute or two to remember why $count = () = split
> doesn't work, I'd be in favour of fixing that as well. The only occasion
> where someone might be assigning a split to a (literal) empty list is as
> part of this idiom.

$count = () = split(/PATTERN/, EXPR) doesn't work, but
$count = () = split(/PATTERN/, EXPR, -1) does.

A different default limit when assigning to a list is already
an exception; I'd rather not add an exception to the exception
when the list is empty.

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