in reply to configurable regex match

the context in which "i" is used in /$regex/i makes it a regular expression modifier. Perl supports quite a number of these modifiers for Regular Expressions...

Anyhow, what you have been trying to achieve involves assigning to a scalar a character value, then using it as a modifier, whereas the compiler understands that in this place it wants to see a character corresponding to the action that the modifier implies instead.


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.