$words="a title of a webpage";
$words = join ' ', map {ucfirst lc} split / /,$words;

print "$words\n";


↑これね。