in reply to Grep expansion problem

If you change the regex to /^\Q$x\E$/ it works. \Q..\E stops the regex from interpreting the parens as metacharacters.