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
|
|---|