perl -e '$s = q|b(s)|; print "without quotemeta" if $s =~ /$s/; print "with quotemeta" if $s =~ /\Q$s\E/;' with quotemeta