> On 8 Sep 2025, at 11:29, Marc Chantreux <[email protected]> wrote: > so my dream would be to write liz's example close to this: > > "example.txt".IO.slurp > .&{ g:s/Hello/Hi/ } > .spurt: $filename
The reason this doesn't work, is because s:g/Hello/Hi/ requires a writeable
$_, and the invocant of .&{ } is not writeable in this example.
If you really like s/// syntax that much, why not use .subst(/Hello/, "Hi",
:g) instead?
