John Gruber recently published a perl script to convert strings into title case avoiding capitalizing small words based on rules from the New York Times Manual of style as well as catering for several special cases.