Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!marvit From: marvit@hplpm.hpl.hp.com (Peter Marvit) Newsgroups: comp.lang.perl Subject: Capitalizing words in a line. Message-ID: Date: 14 Feb 91 00:09:35 GMT Sender: news@hplabs.hpl.hp.com (placeholder for future) Organization: Hewlett-Packard Laboratories, Palo Alto, CA Lines: 17 My own thanks to the fellow who needed to UPPERCASE certain key words in a file. It's a problem I just needed a solution for. However... My conumdrum? I need to *capitalize* some or all words on an input line. That is, change from "lower case" to "Mixed Case And Capitalized Words" (as in GnuEmacs's 'capitalize-word/region'). I tried doing a s|\w.|tr[a-z][A-Z]| and some variants, but nothing worked correctly. I plead to the perl community for help. Please e-mail solutions and I will summarize for the net. -Peter "scalloped perl" Marvit : Peter Marvit Hewlett-Packard Labs in Palo Alto, CA (415) 857-6646 : : Internet: uucp: {any backbone}!hplabs!marvit :