in reply to Perl6 regex substitutions

You can also use the method form if you are more a Java(Script) guy:
use v6; my $x = "this is a test".subst(/\s/, '-', :g); # or my $x = "this is a test"; $x.=subst(/\s/, '-', :g);
The second example calls the subst method on $x (that's why you see a dot), and then mutates it (the equal sign).

:g is again the adverb for global matching, like in s:g///.