my $percent = int (($amount / $length) * 100);