Check CPAN for a module called Lingua::EN::Numbers for spelling numbers by (American) English rules.
It only spells them cardinally (one two three), not ordinally (first second third), but it can handle negative numbers and decimal fractions.
Update: You changed your question while I composed my response. For basic English rules, I suggest a book like the Chicago Manual of Style, or Elements of Style, or Garner's Modern American Usage.
-- [ e d @ h a l l e y . c c ]
| [reply] |
Hmm... I was checking out a FAQ of Chicago Manual of Style and they use the styles mixed up themselves. For example, they give one example in which they both use "twenty one" and "twenty-one". But, as it appears to me, it's most common to just put a space between every single unit (one hundred, six hundred, four hundred eighty four). So... until I find a resource which is more consistent, I'll do it this way.
Thank you for your hint, anyway.
| [reply] |
| [reply] [d/l] |
Ok. This one suggests to write any numbers between twenty-one and ninety-nine with hyphens. So does my script, now. All other units are still seperated by a space character. Thank you, BrowserUk.
| [reply] |