Re: match's replacement name?

2014-05-23 Thread Peter Schwenn
Timo, perl6-users, I don't want to print out the WHOLE text resulting from the match (in my case a long file,) but just the /replacement/ string. I'm sticking with syntax such as (which is also - for me - readable) $layn ~~ s:g / (\W) [[RMA\.]? OpenNURBS\.]? I? On ([2..4]) dPoint

Re: match's replacement name?

2014-05-23 Thread Patrick R. Michaud
On Fri, May 23, 2014 at 03:08:38PM -0400, Peter Schwenn wrote: Still it would be more straightforward to have something like $layn ~~ s:g/ (\W) [[RMA\.]? OpenNURBS\.]? I? On ([2..4]) dPoint /$0Rhino.Geometry.Point$1d/; and have a more perl6-built-in way of getting hold of the

Re: match's replacement name?

2014-05-23 Thread Peter Schwenn
Patrick, I would agree with you that saving all the replacements does NOT warrant the overhead. Saving how many matches were made would not be at all heavy overhead, but again, its easy to do in a closure so that too is not really necessary. Just takes awhile to learn how to use the closures.