Perl 5: $x = "this is a test"; $x =~ s/ /-/; [download]
In reply to Perl6 regex substitutions by kovacsbv