tariqahsan has asked for the wisdom of the Perl Monks concerning the following question:

Is there a function to decode a number to it's spelled
out english word? Like 1 would be converted to 'One', 2 to 'Two'
and so on.
  • Comment on Any function to spell out a number in word?

Replies are listed 'Best First'.
Re: Any function to spell out a number in word?
by davidrw (Prior) on Aug 31, 2005 at 18:13 UTC
Re: Any function to spell out a number in word?
by davido (Cardinal) on Aug 31, 2005 at 18:14 UTC
Re: Any function to spell out a number in word?
by GrandFather (Saint) on Aug 31, 2005 at 21:13 UTC

    There are some interesting differences:

    Number::Spell 1000519252 -> one billion five hundred nineteen tho +usand two hundred fifty two Number::Spell (eu) 1000519252 -> one thousand million five hundred nin +eteen thousand two hundred fifty two num2en 1000519252 -> one billion, five hundred and ninetee +n thousand, two hundred and fifty-two num2en_ordinal 1000519252 -> one billion, five hundred and ninetee +n thousand, two hundred and fifty-second

    Perl is Huffman encoded by design.