bl0rf said it: don't stringify things that you don't actually need as strings. The "number of digits" needs no stringification, it's a logarithm:
sub number_of_digits { my $number = shift; my $base = shift || 10; 1 + int( log($number) / log($base) ) } [download]
In reply to Re: Scientific Notation Throws Off Results. by fruiture in thread Scientific Notation Throws Off Results. by Elijah