# capitalize words perl -pe 's/\b(.)/\U$1\E/g' foo_input_file # ...