my $percent = sprintf("%.2f", ($amount * 100 / $length));Where printf prints out the result, sprintf will return the result without printing, or in another sense, print to a string.
In reply to Re: Decimal Places
by tadman
in thread decimal places
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |