develooper Front page | perl.perl6.language | Postings from December 2004

Re: Angle quotes and pointy brackets

Thread Previous | Thread Next
From:
Luke Palmer
Date:
December 2, 2004 19:42
Subject:
Re: Angle quotes and pointy brackets
Message ID:
20041203034217.GA26603@navi.cx
John Williams writes:
> Is all the "Extensible metasyntax (<...>)" being changed to «...» ?
> 
> Or is the new rule that <...> is capturing metasyntax, and «...» is
> non-capturing metasyntax?

That's the one.

> You can't really capture anything on an assertion, so
>     /^foo .* <( do { say "Got here!" } or 1 )> .* bar$/
> is probably not an issue at all.
> 
> How are the results different between these?
> 
>     /<ident>/

Puts <ident>'s match object in $<ident> (of the current match object).

>     /(<ident>)/

Puts <ident>'s match object in $<ident> and its text in $1.

>     /(«ident»)/

Puts the text captured by «ident» into $1.

Luke

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