joshordan
asked on
Formatting a number being displayed
I am customising a script and I have not really used perl/cgi before. I have a price which is displayed. The code looks like:
<td>Total Price</td>
<td><b>UK£ $price</b>
If $Price is 10.46, it is displayed correctly but if $Price is 10.40 it is displayed like 10.4 missing the zero. Any ideas how I can format this number to be displayed correctly everytime.
<td>Total Price</td>
<td><b>UK£ $price</b>
If $Price is 10.46, it is displayed correctly but if $Price is 10.40 it is displayed like 10.4 missing the zero. Any ideas how I can format this number to be displayed correctly everytime.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome
ASKER