Robert Citek wrote:
> Not sure if there is a better way.  My guess is that there is probably
> some module to convert float to currency and then print it as a
> string.  But a quick Google didn't turn up anything.

Here' why (extracted from `perldoc perllocale`):

   Category LC_MONETARY: Formatting of monetary amounts

       The C standard defines the "LC_MONETARY" category, but no
function that is affected by its contents.  (Those with experience of
standards committees will recognize that the working group decided to
punt on the issue.)  Consequently, Perl takes no notice of it.  If you
really want to use "LC_MONETARY", you can query its contents--see "The
localeconv function"--and use the information that it returns in your
application’s own formatting of currency amounts.  However, you may well
find that the information, voluminous and complex though it may be,
still does not quite meet your requirements: currency formatting is a
hard nut to crack.



-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to