develooper Front page | perl.perl6.language | Postings from May 2005

Re: split /(..)*/, 1234567890

Thread Previous | Thread Next
From:
Larry Wall
Date:
May 12, 2005 12:02
Subject:
Re: split /(..)*/, 1234567890
Message ID:
20050512190159.GA15255@wall.org
On Thu, May 12, 2005 at 12:03:55PM -0500, Jonathan Scott Duff wrote:
: I think that the above split should generate a list like this:
: 
: 	('', [ '12','34','56','78','90'])

Yes, though I would think of it more generally as

    ('', $0, '', $0, '', $0, ...)

where in this case it just happens to be

    ('', $0)

and $0 expands to ['12','34','56','78','90'] if you treat it as an array.

Larry

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