Rule #1 of floating-point computing in any language, not just Perl:
Never compare two floating-point numbers with == or != (or expect >= et al. to work in the edge cases). Use a tolerance range instead. Other monks have already explained the cause behind this numerical imprecision.
For a detailed explanation, see Comparing floating point numbers