use strict; use warnings; my $str = "a history of u.s. coast guard aviation. M.C. Esher"; $str =~ s/(?<=\W\w)\.//g; print $str, "\n"; #### # Remove periods and capitalize, so we have US instead of us. $str =~ s/(?<=\W)(\w)\./\U$1/g;