in reply to variable type

If you're using DBI and placeholders then it should figure out the numericalityness of values and send them to the database correctly. If it's not you can use the bind_param method on a statement handle to explicitly set the SQL type a given placeholder should have. See the DBI docs for more details.