Christopher M Burger wrote: > 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
Straight from the Perl Cookbook: sub commify { my $text = reverse $_[0]; $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g; return scalar reverse $text; } Just feed it a number and either print the return or place in a variable to work with. Wags ;) ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]