SPUG: regular expressions

Jeremy Mates jmates at sial.org
Tue Jan 17 13:26:00 PST 2006

* luis medrano <lmzaldivar at gmail.com>
> perl is number one
> to
> Perl Is Number One

Quick, dirty, and possibly missing all sorts of edge cases:

echo test ing | perl -pe 's/\b(\w)/\U$1/g'

Depending on what you are doing, also consider {case => title} or {case
=> highlight} of the nifty Text::Autoformat module.


More information about the spug-list mailing list