# Pastebin 8y0o1b7V > my constant %substitutions = 'r' => 'w','l' => 'w','R' => 'W','L' => 'W'; Map.new((L => W, R => W, l => w, r => w)) > my $str = "the quick brown fox jumped over the lazy dog"; the quick brown fox jumped over the lazy dog > for %substitutions.kv -> $k, $v { $str ~~ s:g/$k/$v/ }; Nil