in reply to Get logarithm of base 10
Or if you wanted base N (where N could be 2, π, 10, 16, etc.)...
sub log_N { my $num = shift; my $base = shift; return log($num)/log($base); } [download]