Not always. I found a bug trying to deploy JSON::XS on AIX 7 where '5e1' was deciphered by JSON::XS, and came out to 50.0000000007 or something. On other platforms, it worked fine. And this was basically because there's a bug in AIX 7's libm where rounding happens wrong or something. So anyway, when comparing with ==, they failed to match, but comparing with eq made it work (because perl stringified the number to 50, due to a lower precision).
So what I'd do here is try to get more information about both $ray and each value and see if there's a mismatch at some higher precision, e.g., using sprintf "%.15f", $ray (and likewise for each value in the worksheet being compared against). That is for == failures. For eq failures, what I learned many many years ago was to put my debug in delimiters. I learned with [...], so something like this: print "ray = [$ray]\n" to see if there are spaces. Even better to use Data::Dumper or something else that will not only use delimiters (often quotes) but also look for non-printables and convert them (e.g., tabs, nuls, etc.).