On Thu, 24 Oct 2002, Larry Wall wrote:
> It's possible the syntax for substitution should be wrapped around the syntax
> for matching, whatever that turns out to be.

That strikes me as promising...

Going back to Perl5 for a moment, we have

  substr($str,$start,$len) = $newstr

why not simply extend pattern-matching in a similar way to substr, making it
an L-value, so that one gets

  $str ~ /[aeiou]+/ = "vowels($&)"

or

  $str ~ /\d/ {hyper-symbol}= (0) x {size-of-LHS-array};

(hyper, however it's spelt, will have some way for the RHS to reference the
LHS, won't it?)

-Martin

-- 
4GL ... it's code Jim, but not as we know it.

Reply via email to