To the best of my knowledge, there isn't one. I seem to recall that in O'Reilly's Perl Cookbook, there was a recipe for accomplishing much of what number_format() does, but using regular expression operators. Want the best answers? Ask the best questions:
Okay here is what I want to do in perl:
$Red_Subtotal = "\$" . number_format($Red_Subtotal_Raw_Data, "2", ".", ","
This takes the $Red_Subtotal number and checks to see if the number has two decimal places, if it does not, it turns it into $21.00 format instead of $21. It will not, however, change a number like $24.32. How could I do that in perl.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.