On Wed, 2004-05-12 at 14:22, Juerd wrote:
> Actually, can't we just use the . for s///?
Well, that brings up something that I don't think Larry has covered yet.
That is, it brings into question what s/// *is* in the grammar.
Is it a special type of calling convention, e.g.:
sub s (Regex $pat, Str $replace, bool ?$i) is doublequotelike returns(Str) {
bool $did = false;
if my $match = ($CALLER::_ =~ m:i($i)/$pat/) {
$match = $replace;
$did = true;
}
return $did;
}
or is it something more deeply buried in the parser? If it's just
quoting, then that's (relatively) easy:
class String {
...
method s (...) is doublequotelike ... {...}
}
Otherwise, you would have to bury this deep in the parser as a special
case with the definition of s/// and that seems of questionable value
for the complexity you add.
--
Aaron Sherman <[EMAIL PROTECTED]>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback