in reply to Changing case on a word boundary
Try this.
$s ='the quick brown fox'; $s =~ s/\b(\w+)\b/ucfirst $1/ge; print $s;
Gives
The Quick Brown Fox
Update: zigdon++ pointed out that your question showed the input as ALL UPPER CASE, which means that you would need
$s =~ s/\b(\w+)\b/ucfirst lc $1/ge;.
Much safer.
|
|---|