in reply to "42" ~~ "42.0" is false in 5.10

From perlsyn
the first row that applies, in either order, determines the match beha +viour ... Num numish[!] numeric equality $a == $b Any Str string equality $a eq $b Any Num numeric equality $a == $b Any Any string equality $a eq $b

So surely it's using the second case (Any ~~ Str) using string equality.

Replies are listed 'Best First'.
Re^2: "42" ~~ "42.0" is false in 5.10
by szabgab (Priest) on Dec 24, 2007 at 13:13 UTC
    yes, I see that it is correct based on the perlsyn. The question what is the clever reasoning behind the fact that there is no numish ~~ numish using == rule in the table slightly above the Any ~~ Str?
Re^2: "42" ~~ "42.0" is false in 5.10
by jettero (Monsignor) on Dec 24, 2007 at 13:12 UTC

    Indeed. So then 42 ~~ "42.0" would probably be true. I need to get 5.10 installed. I wonder how long before the ubuntu devs will have it ready.

    -Paul