List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:August 4 1999 8:44am
Subject:Re: Initcap?
View as plain text  
On Mo, 1999-07-19 22:15:27 +0100, Kevin Smith wrote:
> [...] simple Perl script [...] which will convert a the first letter
> of each word in a string to capitals and the rest of the word to
> lower case.

You know the perl maxim?  There's More Than One Way To Do It! :)
How about this variant?
   s/ (\w) (\w*) / uc($1).lc($2) /xge;

Martin Ramsch <m.ramsch@stripped> <URL: >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Re: Initcap?Martin Ramsch4 Aug