Rick posited: > Case one: $x ~~ *main > > Case two: $y = 1.23; print $y; $x ~~ $y; > > My gut is that both should warn, > and only the first should fail. Interesting. In contrast, I see those two cases as being exactly the same. Namely: "Failed because unable to smartmatch". I would have thought the various kinds of failures would be more consistent like this: $Zero = 0; $Num = 1; $Str = "1"; $NumStr = 1; print $numstr; $Zero ~~ *GLOB # unmatchable (invalid type) -----> undef $Zero ~~ \%HASH # unmatchable (invalid type) -----> undef $Zero ~~ \@ARRAY # unmatchable (invalid type) -----> undef $Zero ~~ $NumStr # unmatchable (ambiguous types) --> undef $Zero ~~ $Num # matchable but == didn't match --> "" $Zero ~~ $Str # matchable but eq didn't match --> "" That is: defined-but-false when the smartmatch was attempted, but failed; undef-ergo-false when the smartmatch wasn't even attempted. ...and with a warning issued in any case where undef is returned. DamianThread Previous | Thread Next