Hi Jerry

Just check for the existence of a decimal point:

    if ($n =~ /\./) { print "Floating point\n" }
    else { print "Integer\n" );

( This will work even if you have assigned $n = 7.000, but assumes that $n
is at least numeric and isn't so large or small that it's in scientific
notation )

HTH,

Rob

"Jerry Preston" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
>
> I am looking for a simple way to figure out if a value is a integer or a
> float.  How to tell the difference between 7 and 7.5.
>
> Thanks,
>
> Jerry
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to