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.
In reply to Re^2: Format question (capitalization)
by hippo
in thread Format question
by catfish1116
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |