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

Re: Nested captures

May 11, 2005 10:58
Re: Nested captures
Message ID:
> On Wed, May 11, 2005 at 05:48:59PM +1000, Damian Conway wrote:
> : But that's only the opinion of one(@Larry), not of $Larry.
> Let's go 0-based and make $0 =:= $/[0] so that $/[] is all the parens.
> Our old $0 (P5's $&) could be $<> instead, short for $<MATCH> or some
> such.

Why can't bare $/ just striingify to the whole match?
> It's already the case that p5-to-p6 is going to have a *wonderful*
> time translating $7 to $1[2][0]...

Not a real problem.  Patrick has already said that his plan is that :p5 REs will return a match object with an already flattened match list using perl5 left peren counting semantics.

> I wonder how much call there will be for a rule option that uses P6
> syntax but P5 paren binding with "push" semantics.

Just add a :flat 

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