Help for this page

Select Code to Download


  1. or download this
           join ' ', map {ucfirst} split / /, shift;
    
  2. or download this
            join ' ', map { s/^(.)/\U$1/; $_ } split / /, shift
    
  3. or download this
           (my $f=shift)=~s/(^| )(\w)/$1\U$2/g;
           # Doing it with lookbehind gets a little ugly:
           # s/(?:(?<=^)|(?<= ))(\w)/\U$1/g;
           $f;