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

Re: [PATCH] Remove implicit split to @_

Thread Previous | Thread Next
From:
Yitzchak Scott-Thoennes
Date:
July 10, 2009 10:45
Subject:
Re: [PATCH] Remove implicit split to @_
Message ID:
56525.97.113.117.246.1247247906.squirrel@webmail.efn.org
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


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