in reply to substitution "0" in decimals

You can use some kind of number formating or you can learn about regular expressions (perlretut). Heck, I think you can even do this with $x = $old + 0. Cheers.

-Paul