my $percent = int (($amount / $length) * 100); [download]
In reply to decimal places by Anonymous Monk