http://www.perlmonks.org?node_id=1055362


in reply to seek and replace for exceptional characters

Using the quotemeta function is the simplest solution. But so that you understand the underlying reason, your search regex could also be defined as follows (simply escaping the '+' sign):

my $A = qr (\+#);