>perl -wMstrict -le "my $str = 'eternal corruption defilement'; ;; $str =~ s{ (\b [[:alpha:]]+ \s*) }{ uc substr $1, 0, 1 }xmsge; ;; print qq{'$str'}; " 'ECD'