Number::Spell - Perl extension for spelling out numbers


NAME

Number::Spell - Perl extension for spelling out numbers


SYNOPSIS

  use Number::Spell;
  my $str=spell_number(519252);


DESCRIPTION

Number::Spell provides functionality for spelling out numbers. Currently only integers are supported.

By default Number::Spell does American formatting, but can be configured to do European formatting by calling it with the ``Format => 'eu''' option:

        spell_number( ...  , Format => 'eu');

American and European formatting differ in how they represent numbers one billion and above.

        number          :       20000000000 (2 * 10^11)
        American format :       twenty billion
        European format :       twenty thousand million

With American formatting (default) Number::Spell should work for integers to

        nine hundred ninety nine vigintillion nine hundred ninety nine
        novemdecillion nine hundred ninety nine octodecillion nine hundred
        ninety nine septendecillion nine hundred ninety nine sexdecillion nine
        hundred ninety nine quindecillion nine hundred ninety nine
        quattuordecillion nine hundred ninety nine tredecillion nine hundred
        ninety nine duodecillion nine hundred ninety nine undecillion nine
        hundred ninety nine decillion nine hundred ninety nine nonillion nine
        hundred ninety nine octillion nine hundred ninety nine septillion nine
        hundred ninety nine sextillion nine hundred ninety nine quintillion nine
        hundred ninety nine quadrillion nine hundred ninety nine trillion nine
        hundred ninety nine billion nine hundred ninety nine million nine
        hundred ninety nine thousand nine hundred ninety nine

and in European formatting mode is should be valid up-to

        nine hundred ninety nine thousand nine hundred ninety nine vigintillion
        nine hundred ninety nine thousand nine hundred ninety nine
        novemdecillion nine hundred ninety nine thousand nine hundred ninety
        nine octodecillion nine hundred ninety nine thousand nine hundred
        ninety nine septendecillion nine hundred ninety nine thousand nine
        hundred ninety nine sexdecillion nine hundred ninety nine thousand nine
        hundred ninety nine quindecillion nine hundred ninety nine thousand
        nine hundred ninety nine quattuordecillion nine hundred ninety nine
        thousand nine hundred ninety nine tredecillion nine hundred ninety nine
        thousand nine hundred ninety nine duodecillion nine hundred ninety nine
        thousand nine hundred ninety nine undecillion nine hundred ninety nine
        thousand nine hundred ninety nine decillion nine hundred ninety nine
        thousand nine hundred ninety nine nonillion nine hundred ninety nine
        thousand nine hundred ninety nine octillion nine hundred ninety nine
        thousand nine hundred ninety nine septillion nine hundred ninety nine
        thousand nine hundred ninety nine sextillion nine hundred ninety nine
        thousand nine hundred ninety nine quintillion nine hundred ninety nine
        thousand nine hundred ninety nine quadrillion nine hundred ninety nine
        thousand nine hundred ninety nine trillion nine hundred ninety nine
        thousand nine hundred ninety nine billion nine hundred ninety nine
        thousand nine hundred ninety nine million nine hundred ninety nine
        thousand nine hundred ninety nine


FUTURE IMPROVEMENTS

        o   more formatting options.  i.e. option to get "1500" to spell as
                 "fifteen hundred" instead of "one thousand five hundred"
        o   support for even larger numbers
        o   support for taking input as a Math::BigInt, Math::BigInteger
        o   support for taking numbers in scientific notation
        o   foreign language support
        o   support for real numbers (including Math::BigFloat)
        o   ability to convert from a "spelled" number to an arithmetic number


AUTHOR

Les Howard, les@lesandchris.com


SEE ALSO

perl(1).

 Number::Spell - Perl extension for spelling out numbers