Hmmm ... one has to really start clutching at straws to come up with an explanation.
I wondered whether there might be something rendering the "." in "5.040" as garbage (in numeric context) - thereby causing
But that should probably generate a "not numeric" warning - and it could (in theory) just as well be a bug in eval{} or require() or the ternary operator.
I look forward to hearing what the problem was ... if you ever find out.