in reply to Re^2: 5.10 smart match behaviour
in thread 5.10 smart match behaviour

It's impossible.

I started writing a bunch of "if you do X, then problem Y surfaces", but the problem always boiled down to the need to differentiate between a scalar and a one item list. Perl is fundamentally unable to do that.

Without the ability to differentiate between a scalar and a one item list, almost if not all matches become indistinguishable from

@array ~~ @array

While that's a useful test, so are all the test that would be lost.