http://qs321.pair.com?node_id=417166


in reply to Re: RegEx for users who dont know RegEx
in thread RegEx for users who dont know RegEx

($reg_exp = $user_query) =~ s/(\W)/$1 eq '*' ? "\\S*" : "\\\$1"/ge;
You have too many slashes in the second part of that ternary (results in invalid chars being replaced by a literal '\$1').