$p = $s = "^xxx"; print "$p has $s\n" if $s =~ /\Q$p/; #does print