Re: copying and s/// (was Re: Overlapping RFCs 135 138 164)

[email protected] (Tom Christiansen)
Newsgroups perl.perl6.language.regex
Message-ID <3703.967672524@chthon>
>Uri Guttman wrote:
>> 
>>   TC>     ($this = $that) =~ s/foo/bar/;
>>   TC>     for (@these = @those) { s/foo/bar/ }
>> 
>>   TC> You can't really do those in one step without it.

>RFC 164 v2 has a new syntax that lets you do the above or, if you want:

>   $this = s/foo/bar/, $that;
>   @these = s/foo/bar/, @those;

Those really aren't any more obvious to the reader than what we
already have.  Less so, in fact, since you can understand what the
current ones are doing based on simple operators and precedences.

--tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.