... a couple of ways to ... use all these characters verbatim ... qr is another.
In no way will qr use any metacharacters verbatim unless specifically 'told' to do so, e.g., by a \Q ... \E escape sequence.
>perl -wMstrict -le "my $s = 'hi('; my $rx = qr{$s}; " Unmatched ( in regex; marked by <-- HERE in m/hi( <-- HERE / at ...
Update: See qr in the Regexp Quote Like Operators section of perlop, also see section on 'escape sequences' (for \Q) in Quote and Quote like Operators, also in perlop.
In reply to Re^2: Possible Match Problem
by AnomalousMonk
in thread Possible Match Problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |