in reply to 1 mismatch string matching

You can perform approximate matching using the String::Approx module.

If you want to roll your own, try

$what_matched = $1 if $string =~ /\b(\watch|m\wtch|ma\wch|mat\wh|matc\w)\b/;
Replace the  \w with  . or  [a-z], etc., according to what errors you want to accept.

-Mark