my $percent = sprintf("%.2f", ($amount * 100 / $length));