$num =~ s/\.(\d)\d+/.$1/; # perform the rounding (as string)