Re: RFC 331 (v2) Consolidate the $1 and C<\1> notations
[email protected] (Bart Lateur) Sun, 01 Oct 2000 09:25:17 +0200
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Organization | MediaMind |
| Message-ID | <[email protected]> |
On 1 Oct 2000 06:26:40 -0000, Perl6 RFC Librarian wrote: >If you did the following: > >C<"Bilbo Baggins" =~ /((\w+)\s+(\w+))/> > >Then @/ would contain the following: > >C<$/[0]> the compiled equivalent of C</((\w+)\s+(\w+))/>, > >C<$/[1]> the string "Bilbo Baggins" > >C<$/[2]> the string "Bilbo" > >C<$/[3]> the string "Baggins" It's not clear to me why you picked @/ as the name for the array. For mnemonic reasons, i.e. similarity with existing special variables, @& or @+ (see $& and $+) would make more sense. Well, @+ is taken... -- Bart.