in reply to Matching quoted variables. Cant make it work..

Because =~ is the regular expression binding operator, not string equals (which is what eq). It matches the regex on its right hand side against the scalar on the left. Since you've given it a string with regular expression metacharacters in it which doesn't match itself it fails. See perlretut and perlre.

(Once you've read that try and figure out what would happen if you changed it to $b = "\Q$a\E" instead . . .)