The problem is pretty simple, as others have stated and is due to the rounding off of floating point numbers.
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:
perldoc -q Why am I getting long decimals (eg, 19.9499999999999) inste
+ad of the numbers I should be getting (eg, 19.95)?
in essence answers this question, but it could be indexed with a different heading, something like:
Why don't my floating point numbers equal each other?
--
Regards,
Helgi Briem
helgi DOT briem AT decode DOT is