Luke Palmer wrote:
On 8/31/06, Juerd <[EMAIL PROTECTED]> wrote:
> Still, though, How would you specify :g? It doesn't make a lot of sense
> on rx// -- just like you can't use it with qr// in Perl 5.
It is a good point that it doesn't belong on the regex. Perhaps:
$foo.subst(/bar/, "baz", :g)
That seems to work, though the weight is at the front again. Oh.
$foo.subst(:g, /bar/, "baz")
IIRC, :g is an adverb, and adverbs are merely syntactic sugar for
named parameters. So perhaps the signature for the substitution
method should include a slurpy hash of modifiers...
The question then becomes whether or not you can pass a modifier to
the regex in by means of the slurpy hash, or if it _has_ to be
packaged with the regex.
Jonathan "Dataweaver" Lang