Re: RFC 112 (v1) Assignment within a regex

2000-08-17 Thread Kevin Walker
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

Re: RFC 112 (v1) Assignment within a regex

2000-08-16 Thread David L. Nicol
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: > >

Re: RFC 112 (v1) Assignment within a regex

2000-08-16 Thread Glenn Linderman
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=..)/