... and can I rely on this in general
If the left hand side and the right hand side stringify to the same string, then you can rely on the "eq" condition being true.
And if the left hand side and the right hand side stringify to different strings, then you can rely on the "eq" condition being false.
The danger lies in what you might deduce from the result of such comparisons:
$ perl -le 'print "ok" if 1.4142135623731 eq 1.4142135623730951;'
ok
$ perl -le 'print "ok" if 1.4142135623731 != 1.4142135623730951;'
ok
Cheers,
Rob