With quotemeta or /\Q$a\E/. See perlre for details.
In reply to Re: pattern match special char by moritz in thread pattern match special char by Selvakumar