in reply to Character positioning
Okay, here's an approach using substr to get you started:
my $word = 'cat'; my $mask = '___'; my $guess = 'c'; substr($mask, 0,1) = $guess; print $mask;
You'll still need to figure out the indexes at which the characters need to be replaced, but that shouldn't be too hard.
|
|---|