For the "0." thing, if you are litteraly using "0." (with the quotes), you _are_ defining a string.
You could either define it as a number (Could even use 0. for that in perl altough I advise you to just use 0),
or convert your value explicitly to a number: "0." + 0 (or int( "0." ) to make it an integer).
This will make sure that -whatever you are defining- contains the number '0' at the end.