in reply to Re^2: Requiring a version
in thread Requiring a version

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 0 + "$version") to return "5".
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.

Thanks for the heads up about the typo

You're welcome - I just hope it doens't turn out to be contagious.

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: Requiring a version
by GrandFather (Saint) on Jun 19, 2024 at 04:32 UTC

    While we are clutching at straws, could 040 be being treated as octal and thus interpreted as 32 decimal?

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond