in reply to How do i capitalise sentences?
ucfirst capitilizes the first character of a string capitilized, the regular expression takes care of the rest. My code above would not behave properly if there were a lower-case abbreviation, etc...my $d=ucfirst("sample. data some! will be. captilized"); $d=$s/([\!\.]\s*)(\w)/$1\U$2\U/g;
|
|---|