# Remove periods and capitalize, so we have US instead of us. $str =~ s/(?<=\W)(\w)\./\U$1/g;