[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Change "WORD" to "Word"



I'm trying to change words that are in all upercase to upper and lower.
And i can'rt seem to come up with a logical way to achieve this.

Here's my problem... I'm writing a script for our sports section to
process the NBA boxscores for publication.

Far too often AP sends words in the file in all uppercase and we change
them. For example: L.A. LAKERS, PHILADELPHIA, SAN ANTONIO. Iturned
everythig to lowercase with "tr" But now I can't seem to come up with a
search that will only change the first letter of a word.

Any ideas?

I've been trying, in a while statement, to change every lowercase char
that isn't preceded by another lowercase char or uppercase char to
uppercase. (Since the first letter of each word would be at the begining
of the string or preceded by a space, comma or period.  I figured that
would work, but I end up changing every char. to uppercase.

Any help would be greatly appreciated. Thanks.


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch