in reply to Capitalize the first letter of each word

Greetings all,
Yet another way to do it.
use strict; my $text = "to say it once"; $text =~ s/(\w+)/\u\L$1/g; print $text;
produces:
To Say It Once

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

Replies are listed 'Best First'.
Re^2: Capitalize the first letter of each word
by brian_d_foy (Abbot) on Jul 11, 2005 at 20:26 UTC

    Of course, your solution is broken for the reasons I explain in perlfaq4.

    --
    brian d foy <brian@stonehenge.com>
      Thanks for the heads up.

      -InjunJoel
      "I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo