in reply to Convert lowercase string to uppercase
The last example shows (again) the power of RegExps, easily giving you the (usual) ability to uppercase only some 'wanted' item from the input lines like...perl -ne 'print uc' foo_input_file # or perl -pe '$_ = uc' foo_input_file # or even ... perl -pe 's/(.+)/\U$1\E/' foo_input_file
# capitalize words perl -pe 's/\b(.)/\U$1\E/g' foo_input_file # ...
|
|---|