I find that a huge selling point for scripting addicts to join raku would be having such constructs possible
my $w = "Hello world";
$w
~~ s/Hello/Hola/
~~ s/world/mundo/
;
say $w; # » Hola world
However I don't seem to be able to write something like this.
As far as I know doing this with the .subst
method
of Str
would be too ugly, and this chaining of
s///
or even also tr///
basically would be
a gateway drug for sed
users etc.
My question is if I'm missing something, if something remotely similar to this is possible somehow in raku. I'm not a beginner and I could not figure it out.