A.5.7 Problems with Floating-Point Comparison
floating-point numbers cause confusion sometimes, because these numbers are not stored as exact values inside computer architecture. What one can see on the screen usually is not the exact value of the number.
Field types FLOAT, DOUBLE and DECIMAL are such.
You cannot just match a float variable from a perl DBI call to a FLOAT value from a field in MySQL. Matching will be totally inconsistent. This link explains how you actually do it.