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;
In reply to Re: How do i capitalise sentences?
by lhoward
in thread How do i capitalise sentences?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |