$a="xxx^1.0"; $b="xxx^1.0 yyyy zzz"; if($b=~/\Q$a\E/) { print "worked\n"; } else { print "nope\n"; } run test: nope [download]
In reply to Escaping metacharacters by nosduh