in reply to bug? why does this ~~ smart match to an array slice fail?

Hello,

let's look a little close to this link

There is no variant Any ~~ Array, but we see It is always commutative, i.e. $a ~~ $b behaves the same as $b ~~ $a..

Array Any array contains string grep $_ eq $b, @$a

It's that we need. @$a - means that Array is a reference to array => you must use $i ~~ [ @ar[1..4] ]