in reply to Match non-capitalized words at the beginning of each sentence
And use this as testfile (make your own spelling errors ;):local $/; $/ = "."; open FH, "./testfile"; open OH, "> ./outputfile"; while (<FH>) { s/^(\W*)(\w)/$1\u$2/; print OH $_; } close FH; close OH;
note that it doesn't handle the domain name very gracefully, as it will not handle any other instances of embedding periods within sentences as non-periods. However, I can't really think of many:this is a test sentence. this is another one. we want to test wheter + or not this will make these sentences uppercase. another paratraph. and another sentence. An upercase one. a differetn kind of break. thisone is kind of difficult: www.goof.com.
|
|---|