in reply to Re^2: Rounding off the scale value after decimal point
in thread Rounding off the scale value after decimal point

You can squash trailing zeros with  $num =~ s/0+$//;