$result =~ s/(Mr(s)?) a/\1 A/s; \1 better written as $1 at...