Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: variable type

by themage (Friar)
on Dec 07, 2006 at 14:49 UTC ( #588342=note: print w/ replies, xml ) Need Help??


in reply to variable type

Hi Losing,

You have the usual way to verify if a variable is numeric, and that would be to use a regexp:

unless ($val1=~/\A[-+]?\d+\.?\d*\Z/) { #quote here $val1, for example: $val1=$dbh->quote($val1); }


I'm obviously, assuming that $dbh->quote for a DB2 connection don't quote the values correctly, that I think should happen.

TheMage
Talking Web


Comment on Re: variable type
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://588342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2015-07-30 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls