in reply to Re^2: Splitting String???
in thread Splitting String???
Okay, I want to truncate the decimal places to 6 decimal places ... Is there a simpler way to do this?You mean like this?
Note: The substr is there to avoid the rounding of sprintf. You could write sprintf ("%.6f", $declon) but then the value will get rounded.my $declon = -88.9999999999999999999; my $declat = 44.1111111111111111111; print substr(sprintf ("%.7f", $declon),0,-1), "\n", substr(sprintf ("%.7f", $declat),0,-1);
|
|---|