SPUG: Working with currency

Jay Scherrer jay at scherrer.com
Thu Apr 2 17:10:47 PDT 2009


Is the problem within the actual calculations or the display?
Perl does quite good at math by itself. And the built in print format 
sprintf works rather well. ex: sprintf(%0.2f);

Jay Scherrer
Bookkeeping and Tax Service



Michael R. Wolf wrote:
> I've got some students in class this week whose process was halted 
> because they were off by $0.02 in their $3M totals.
> 
> A quick CPAN search unearthed Math::Currency.  If anyone has experience 
> with it, I'd appreciate a quick "thumbs up" or "thumbs down" quick 
> poll.  I'd also appreciate any quick pointers to useful modules or 
> practices (or anti-recommendations or anti-patterns).
> 
> I don't need a *description of the problem*.  I understand the 
> limitations of software and hardware.  What I'm looking for is some 
> pointers to *pre-existing solutions*.
> 
> Thanks,
> Michael
> 
> P.S.  I'm not making up the "2 cents" part.  It sounds so cliche, but 
> it's the real figure.  Go figure!!!
> 


More information about the spug-list mailing list