There was a post about this exact thing a few weeks or so ago. I can't remember who
posted it but
Here is what I use, works like a monkey in heat!
#!/usr/bin/perl
$commify_this_number = $ARGV[0];
$commify_this_number =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;
print $commify_this_number;
It will put commas in the proper places on digits to the left of a decimal or letters.
DMuey
> -----Original Message-----
> From: Christopher M Burger [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: formating numbers.
>
>
> I have some numbers that I want to format into a 00,000.00
> format. Right now the numbers are link 00000.00 how do I get
> the commas in there. I also do not know how many commas I
> will need. As the number may be 0000000.00 thus it would need two.
>
> Appreciate any help.
>
> Chris Burger
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]