Re: $& and copying: rfc 158 (was Re: RFC 110 (v3) counting matches)
[email protected] (Tom Christiansen)
| Newsgroups | perl.perl6.language.regex |
|---|---|
| Message-ID | <5174.967751519@chthon> |
>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