Hi jaydee,
$y =~ /^\Q$x\E/;
See also quotemeta and Mind the meta!
Update: Actually, you said "$y sometimes contains regex special characters" - my answer applies if $x contains special characters. If $y contains special characters and $x does not, you don't necessarily need to escape $x, although the general advice in Mind the meta! still applies that it's safer to always use \Q...\E except in the case that you intentionally want the contents of the variable being interpolated into the regex to be interpreted as a regex. Update 2: Clarified wording.
Hope this helps,
-- Hauke D