The problem is pretty simple, as others have stated and is due to the rounding off of floating point numbers.
in reply to Bug? 1+1 != 2
The real problem is however, that this is a Very Frequently Asked Question and as such, should be answered in the FAQ.
Of course the question in perlfaq4:
in essence answers this question, but it could be indexed with a different heading, something like:
perldoc -q Why am I getting long decimals (eg, 19.9499999999999) inste
+ad of the numbers I should be getting (eg, 19.95)?
Why don't my floating point numbers equal each other?
helgi DOT briem AT decode DOT is