This should do what you want:
Note that I didn't test this and that it will replace multiple spaces between words with a single one. Basically, the ucfirst function is applied to each word in the list obtained by splitting the original string. After that, that list is join together again.my $upcased = join(" ", map(ucfirst($_), split(/\s+/, $str)));
Hope this helps, -gjb-
In reply to Re: Correct case
by gjb
in thread Correct case
by stew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |