On Mon, 09 May 2005 22:51:53 +1000, Damian Conway wrote:
>      # Perl 6...
>                    # $1      $2    $3   $4    $5           $6
>      $tune_up6 = rx/ (don't) (ray) (me) (for) (solar tea), (d'oh!)
>                    # $1      $2      $3    $4        $5
>                    | (every) (green) (BEM) (devours) (faces)
>                    /;

Does numbering of captures after an alternation continue as if the
alternative with the most captures matched?

    #   $1    $1  $2    $3, even if (a) matched
  rx/ [ (a) | (b) (c) ] (d) /;


If you explicitly number the first capture in one alternative, does that
affect the numbering of the other alternatives?

    #       $4    $4
  rx/ [ $4:=(a) | (b) ] /;


> Note that, outside a rule, C<@1> is simply a shorthand for C<@{$1}>

Is @/ also a shorthand for @{$/} ?


-- 
        Peter Haworth   [EMAIL PROTECTED]
"I am continually amazed by the intuitive straightforwardness of the interface
 of my microwave and oven. If they were designed by the people who design
 computer interfaces, it would take both hands and several minutes just to set
 the timer."            -- Adam Rice

Reply via email to