in reply to Capitalize First Letter of Each Word
This looks like one of the infamous homework problems ... What have you tried so far ? Here is a solution that works but won't get you many marks for homework ;)
perl -ne'$l=" ";for(split//){$_=$l eq" "?uc$_:lc$_;print;$l=$_}'
Cheers,
R.
|
---|