in reply to Re: Case-sensitive substitution with case-insensitive matches
in thread Case-sensitive substitution with case-insensitive matches
runrig's solution also works very nicely with locales. In a locale where 'áÁéÉ' are all letters, for example, ($_ = "Á") =~ s/(á)/fix_case($1, 'é')/eig; will change $_ from "Á" to "É"!