Graham Barr ([EMAIL PROTECTED]) wrote: > On Mon, Mar 10, 2003 at 09:44:08PM +0530, shn wrote: > > I was just bored and was wondering what would be a better way to titlecase > > something, using this right now: > > > > perl -e "$_='boink boink';@a=split' ';foreach(@a){$_=ucfirst;}$_=join' ',@a;print" > > perl -le "$_='boink boink'; s/(\w+)/\u$1/g; print"
<golf> echo "boink boink" | perl -pe 's/\b./\u$&/g' <!-- no closing tag -->