in reply to binding operator
Well for one thing your first version is assigning the result of comparing qr/(a|b|x)/i against $_ back into $_. Harmless in this case, but . . .
For another, your second chunk is attempting to match the regex qr{ /(a|b|x)/} against $teststring which isn't what you mean either. When you use the match operator with different delimiters you don't need the extra slashes (e.g. you really meant if( $teststring =~ m{(a|b|x)}i ) {...} there).
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|