You cannot use ~~ to match a given string with an array of patterns. You can do the opposite: match a pattern against an array of strings.
But you're matching a string against an array. And that is true iff there's an exact match of the string with at least one element of the array.
See the perlsyn manual page.
In reply to Re: string/array smart match regex failing me
by JavaFan
in thread string/array smart match regex failing me
by gizmo_mathboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |