in reply to pattern match special char

With quotemeta or /\Q$a\E/. See perlre for details.

Perl 6 - links to (nearly) everything that is Perl 6.