I want to use pattern-matching operators with the pattern stored in a variable,
e.g. m/$pattern/, s/$pattern/$replacement/.
The problem is that the patterns may include characters (like brackets) which
are special in regular expressions, thus causing an undesired result.
What would be the best way to handle this problem?