On Wed, May 11, 2005 at 12:01:35PM -0500, Patrick R. Michaud wrote:
> Of course, this now begs the question -- where are things stored
> after doing ... ?
> 
>     rx :perl5 / (don't) (ray) (me) (for solar) /
> 
> My guess is that within the rule they're $1, $2, $3, etc. as before,

Within the rule, $1 and $2 should still refer to the previous match,
as in P5 rules they are spelled as \1 and \2.  Of course, with P5 rules,
they would not be written as \0 and \1 simply because they are running
in Perl 6.

However, the subst part of s/// may look weird:

    pugs> $_ = "foo foo"; s:P5/(\w+) \1/--$0--/; $_
    '--foo--'

But it's probably unavoidable.

Thanks,
/Autrijus/

Attachment: pgp7CKwIDXwVM.pgp
Description: PGP signature

Reply via email to