#!/Users/colomon/tools/parrot-latest/languages/rakudo/perl6
my $search_word = @*ARGS.shift;
my $replacement = @*ARGS.shift;
for =$*IN -> $x
{
my $y = $x.subst($search_word.lc, $replacement.lc,:g);
my $z = $y.subst($search_word.uc, $replacement.uc,:g);
say $z.subst($search_word.lc.ucfirst, $replacement.lc.ucfirst,:g);
}
I'll probably tweak this with some further improvements, including one that
Names! (Score:1)
$x, $y, $z?
Really?
Re: (Score:1)