Change:
return sprintf("%.2f", $outval/100);
to
return $outval;
Change:
print "\$total: $total\n";
to
printf("%s: %.2f\n", '$total', $total/100);
- tye
In reply to Re: Adding floats (integers)
by tye
in thread Adding floats
by perldiverx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |