in reply to string/array smart match regex failing me
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: string/array smart match regex failing me
by ikegami (Patriarch) on Jan 05, 2011 at 22:48 UTC | |
|
Re^2: string/array smart match regex failing me
by GrandFather (Saint) on Jan 05, 2011 at 23:55 UTC |