Do I really need this Workaround to keep the numerical output format from changing for small numbers in perl?
for ( 77777, 10, -15, 132, 66, 444.33, 0.0002 ) {
my $x = $_ / 1000 / 1000;
$x = sprintf "%.12f", $x; # Workaround: to guard against exponential notation
$x =~ s/0+$//; # Workaround: to clean up from previous line
print "$_ mm is $x km\n";
}
Note this is a more general case of Workarounds to print .00001 in perl