Why worry about quoting constructs? qr// has worked very well for ages:
my $p = qr/\^xxx/;In reply to Re^3: Matching patterns containing a caret
by chromatic
in thread Matching patterns containing a caret
by stephanm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |