my $munged_name = Regch($name); $thing =~ /$munged_name/; #### $thing =~ /\Q$name\E/i; #### sub Regch { return "(?i:\Q$_[0]\E)"; }