Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP number_format() to perl command

Status
Not open for further replies.

quebasic2

Programmer
Dec 17, 2002
174
IN
Does anyone know the perl command that is like number_format in php?
 
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.
 
Perhaps asking in the Perl forum (Forum219) would get you more replies. //Daniel
 
Yeah this really isn't the right forum, but I figured someone might know, I have already asked on the perl forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top