I think hash assignment within regex's would be more useful than
variable assignment (though there's no reason there couldn't be both,
I suppose). Here's a copy of something I sent to p5p a while back:
I suggest that (?%field_name: pattern) spit out 'field_name', in
addition to the matched p
Glenn Linderman wrote:
>
> This deserves a "me too".
>
> Perl6 RFC Librarian wrote:
>
> > The camel and the docs include this example:
>
> >if (/Time: (..):(..):(..)/) {
> > $hours = $1;
> > $minutes = $2;
> > $seconds = $3;
> > }
> >
> > This then becomes:
> >
This deserves a "me too".
Perl6 RFC Librarian wrote:
> The camel and the docs include this example:
>if (/Time: (..):(..):(..)/) {
> $hours = $1;
> $minutes = $2;
> $seconds = $3;
> }
>
> This then becomes:
>
> /Time: (?$hours=..):(?$minutes=..):(?$seconds=..)/
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
Assignment within a regex
=head1 VERSION
Maintainer: Richard Proctor <[EMAIL PROTECTED]>
Date: 16 Aug 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: 112
=h