Dear All,
Here is my problem.
$price = "19.99";
$special_offer = "59.40";
$period = "10";
$temp = $period * $price;
$temp = $temp - $price; $temp = $temp + $special_offer; $hosting_price = $temp; Here $hosting_price displays 239.31 which is
fine.
But when $period is set to 1 like
this
$price = "19.99";
$special_offer = "59.40";
$period = "1";
$temp = $period * $price; $temp = $temp - $price; $temp = $temp + $special_offer; $hosting_price = $temp; Here $hosting_price displays 59.4 instead of
59.40. How do I get that one extra zeros.
Are there any format specifier like C in
perl.
Any help regarding this would be greatly
appreciated.
Have a great day.
karthikeyan.
-------------------------------------------------------------------------------------------------------------
Judge not, that ye be not Judged - Abraham Lincoln's favorite quote ------------------------------------------------------------------------------------------------------------- |
- Re: [Perl-unix-users] Formatting problem karthikeyan
- Re: [Perl-unix-users] Formatting problem $Bill Luebkert