Re: Convert money amount to text string - convert.pl

Discussion in 'Perl Misc' started by rupali.wadke@gmail.com, Aug 30, 2013.

  1. Guest

    On Wednesday, 17 December 1997 13:30:00 UTC+5:30, Keith Willis wrote:
    > I recently had a need to convert a money amount to a text string as in:input: 123.45 output: One Hundred And Twenty Three Dollars And Forty Five CentsI have looked through the CPAN list, and was unable to find anything suitable, but someone in comp.databases.sybase emailed me some BASIC code to dothe job. I hacked it into Perl, and it does work, but since it is always going to be hacked BASIC in any language, I wondered whether anyone might have any suggestions for a different/better/more-perl-like approach.Code attached - thanks for any constructive criticism.---------------------------------------------------------------------- The above message reflects my own views, not those of Hewlett Packard. When emailing me, please note that there is no '.junk' in my address.begin 644 convert.pl<encoded_portion_removed>end



    hi ,
    Can you please send me the code ?
    , Aug 30, 2013
    #1
    1. Advertising

  2. Justin C Guest

    On 2013-08-30, <> wrote:
    > On Wednesday, 17 December 1997 13:30:00 UTC+5:30, Keith Willis wrote:
    >> I recently had a need to convert a money amount to a text string as in:input: 123.45 output: One Hundred And Twenty Three Dollars And Forty Five CentsI have looked through the CPAN list, and was unable to find anything suitable, but someone in comp.databases.sybase emailed me some BASIC code to do the job.


    [snip]

    > hi ,
    > Can you please send me the code ?


    You're replying to a message posted in 1997. I've never heard of
    Keith Willis so I doubt he's here any longer.

    If what you're after doing is as Keith mentions above then have a
    look on CPAN for the Lingua modules.


    Justin.

    --
    Justin C, by the sea.
    Justin C, Aug 30, 2013
    #2
    1. Advertising

  3. John Bokma Guest

    Justin C <> writes:

    > On 2013-08-30, <> wrote:
    >> On Wednesday, 17 December 1997 13:30:00 UTC+5:30, Keith Willis wrote:
    >>> I recently had a need to convert a money amount to a text string as in:input: 123.45 output: One Hundred And Twenty Three Dollars And Forty Five CentsI have looked through the CPAN list, and was unable to find anything suitable, but someone in comp.databases.sybase emailed me some BASIC code to do the job.

    >
    > [snip]
    >
    >> hi ,
    >> Can you please send me the code ?

    >
    > You're replying to a message posted in 1997. I've never heard of
    > Keith Willis so I doubt he's here any longer.
    >
    > If what you're after doing is as Keith mentions above then have a
    > look on CPAN for the Lingua modules.


    Indeed, Lingua::EN::Numbers, which I use for my invoices.

    --
    John Bokma j3b

    Blog: http://johnbokma.com/ Perl Consultancy: http://castleamber.com/
    Perl for books: http://johnbokma.com/perl/help-in-exchange-for-books.html
    John Bokma, Aug 30, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?am9l?=

    how to convert string to money(sql db)

    =?Utf-8?B?am9l?=, Apr 28, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    9,585
    =?Utf-8?B?Y2xpY2tvbg==?=
    Apr 28, 2006
  2. Stefan Waldmann
    Replies:
    1
    Views:
    415
    Andrew T.
    Jul 13, 2006
  3. Replies:
    7
    Views:
    402
    Mark Rae [MVP]
    Jan 10, 2008
  4. Replies:
    6
    Views:
    79
    foo bar baz qux
    Nov 29, 2005
  5. PerlFAQ Server
    Replies:
    0
    Views:
    113
    PerlFAQ Server
    Feb 1, 2011
Loading...

Share This Page