Thanks Bruce!

On 6/8/2015 4:04 PM, Bruce Gray wrote:
On Jun 8, 2015, at 3:51 PM, Douglas E. Miles <> wrote:

Hi all!


substr has a 4th argument (or you can use substr as an lvalue) for replacement.

 From I don't see any way to do a 
replacement. What is the idiomatic way of doing a positional string replacement 
in Perl 6? Thanks!
Method form:
$ perl6 -e 'my $s = "abc"; $s.substr-rw(1,1) = "z"; say $s;'

Function form:
$ perl6 -e 'my $s = "abc"; substr-rw($s, 1,1) = "z"; say $s;'

I also do not see substr-rw in
It needs to be added.
In the meantime, you can find it here:

Hope this helps,
Bruce Gray (Util of PerlMonks)

Reply via email to