Perl: Regular Expressions Examples
Capitalise each word.
Section titled “Capitalise each word.”Use the following substitution:
s/(\w*)/\u\L\1/g;\w* represents a word.
\L means lowercase the whole word.
\u means uppercase the first letter of the word.