Re: Formatting currencies

2002-05-03 Thread Greg McCarroll
* Paul Makepeace ([EMAIL PROTECTED]) wrote: perl -lpe '$_ = sprintf %.2f,$_; 1 while s/(?=[\d])((?:\d{3})+)(?=[.,])/,$1/' Is there an easier way to do this? London.pm meeting taken its toll? Are you just looking for nice perl to do this or are you actually wanting to do it in production? If

Re: Formatting currencies

2002-05-03 Thread Paul Makepeace
On Fri, May 03, 2002 at 07:14:32AM +0100, Greg McCarroll wrote: * Paul Makepeace ([EMAIL PROTECTED]) wrote: perl -lpe '$_ = sprintf %.2f,$_; 1 while s/(?=[\d])((?:\d{3})+)(?=[.,])/,$1/' Is there an easier way to do this? London.pm meeting taken its toll? Are you just looking for nice

Formatting currencies

2002-05-02 Thread Paul Makepeace
perl -lpe '$_ = sprintf %.2f,$_; 1 while s/(?=[\d])((?:\d{3})+)(?=[.,])/,$1/' 123.1 123.10 5679.123 5,679.12 1289053234.20852 1,289,053,234.21 Is there an easier way to do this? London.pm meeting taken its toll? P -- Paul Makepeace ... http://paulm.com/

Re: Formatting currencies

2002-05-02 Thread Mike Jarvis
On Thu, May 02, 2002 at 04:16:01PM -0700, Paul Makepeace wrote: perl -lpe '$_ = sprintf %.2f,$_; 1 while s/(?=[\d])((?:\d{3})+)(?=[.,])/,$1/' 123.1 123.10 5679.123 5,679.12 1289053234.20852 1,289,053,234.21 Is there an easier way to do this? London.pm meeting taken its toll? I'd