> > in any case, i think we have a fair agreement on rfc 158 and i will
> > freeze it if there is no further comments on it.
>
> I think you should remove the parts of your propsal about making $& be
> autolocalized.
If you're not planning to revise your RFC, let me know so that I can
> in any case, i think we have a fair agreement on rfc 158 and i will
> freeze it if there is no further comments on it.
In light of this:
$& The string matched by the last successful pattern match (not
counting any matches hidden within a BLOCK or eval() enclosed
by the
>actually it is more like which code refers to $& and which regex that
>caem from. the problem stems from $& being a global and not local like
>$1.
Say what? They scope the same!
sub foo { /./ }
$_ = "stuff";
/.../;
foo();
print $&;
--tom
> MD> One of Uri's suggestions in RFC 158 was to compute $& only for
> MD> regexes that have a /k modifier. This would solve the $& problem
> MD> because Perl would compute $& only when asked to, and not for
> MD> every other regex in the rest of the program.
>
> the rfc was about makin
> "MD" == Mark-Jason Dominus <[EMAIL PROTECTED]> writes:
MD> The $& cost is paid by every regex in the entire program, whether they
MD> used it or not. This is because Perl has no way to tell which regexes
MD> use $& and which do not.
actually it is more like which code refers to $&