d:\>perldoc -q capitalize Found in D:\Perl\lib\pod\perlfaq4.pod 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;