* 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. http://search.cpan.org/perldoc/Text::Autoformat