Perl-Sensitive Sunglasses | |
PerlMonks |
Re: 0.123, float or integerby VSarkiss (Monsignor) |
on Feb 05, 2002 at 23:48 UTC ( [id://143502]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|