Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: 0.123, float or integer

by VSarkiss (Monsignor)
on Feb 05, 2002 at 23:48 UTC ( [id://143502]=note: print w/replies, xml ) Need Help??


in reply to 0.123, float or integer

Well, if your small test script worked, the problem is not with Perl in general, no? ;-)

First, how are you reaching the conclusion that the value is an integer? If the script is printing it out, are you sure it's not doing printf "%d" or some such. As another post in this thread pointed out, Devel::Peek can be very helpful to see what the variable contains. If it's a standalone script, you could use the debugger as well.

If the value is indeed an integer, check that the script hasn't done a use integer. It may be at the top of the script, but just has to be in the scope of the troublesome arithmetic.

HTH

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-04-24 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found