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