That's a good explanation and sound advice. So, is there any harm in doing "$x" ne "2"? Or would it be better to use sprintf "%.02f", $x to convert it?
When, to end the loop? It'll work for this loop. What about longer loops? The loop counter would accumulate more and more error, potentially skewering your numbers and potentially making the loop into an infinite loop. Seems to me to be plain bad practice to knowingly accumulate an error.