in reply to Re: Format question
in thread Format question

A slightly more Perlish alternative:

#!/usr/bin/env perl use strict; use warnings; print title_case('barney rubble'); exit; sub title_case { $_ = shift; s/\b(\w)/\U$1/g; return $_; }

See also the FAQ.