Perl regex to capitalize each word
I always forget how to use Perl regex to capitalize every word in a string buffer. So here it is for future reference:
$buffer =~ s/\b\w/\u\L$&/g;
Monkeying around with Bosco. These are notes to myself. If you're reading this, you're probably lost.
I always forget how to use Perl regex to capitalize every word in a string buffer. So here it is for future reference:
$buffer =~ s/\b\w/\u\L$&/g;
<< Home