Since I was dealing with a line of text, with the Mc anywhere within the line, I used TonyGroves' idea with this modification:
$lineout =~ s/\bMc(.)/Mc${\(uc $1)}/g;
That worked just fine, and I checked through the text and found no anomolies. Thanks, Tony.
I used a pattern to uppercase the first letter of each word, and then lowercase the rest, in a name and address file. This works fine, but, because these are names, there are special cases where I want a specific character within a word to be uppercase, such as the letter following a word that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.