How do I capitalize all the words on one line?

To make the first letter of each word upper case: $line =~ s/\b(\w)/\U$1/g;

To make the whole line upper case: $line = uc;

To force each word to be lower case, with the first letter upper case: $line =~ s/(\w+)/\u\L$1/g;