in reply to
Matches but not substituting
The problem is likely that
[
and
]
are
Metacharacters
in regular expressions used to define character classes. You can avoid you issue by escaping them using
\Q
and
\E
(see
Quote and Quote like Operators
):
$Text =~ s/\Q$Find\E$/$Link/g;
Comment on
Re: Matches but not substituting
Select
or
Download
Code
In Section
Seekers of Perl Wisdom