in reply to Re^2: boolean IN(); function in perl like
in thread boolean IN(); function in perl like

You'd better run $e through quotemeta if you do this, or use the equivalent \Q .. \E re syntax.

(If case does matter, an eq check is definitely going to be faster. If it doesn't, precomputing lc $e and comparing that to lc $_ is still liable to be faster, though it's worth a benchmark. Of course, very often this is not a concern.)