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

Re: Regex query

From:
Larry Wall
Date:
September 20, 2002 07:39
Subject:
Re: Regex query
Message ID:
Pine.LNX.4.44.0209200737390.31624-100000@london.wall.org
On 20 Sep 2002, Aaron Sherman wrote:
: Is that "any list" as oppopsed to "any array"? Or is that arrayref in a
: numeric context the length of the array? In other words does this do
: what I think I think it does?
: 
: 	$shouldbe3 = (1,2,3) + 0;

It's 3, though not for the reason a Perl 5 programmer would think.
(In Perl 6 it's the length of the anonymous array, not the last value.)

Larry




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