$p = $s = "\^xxx";
You probably meant
$s = "^xxx"; $p = '\^xxx'; # or "\\^xxx" ...
(a backslash in a double-quoted string just escapes the next char...)
In reply to Re^2: Matching patterns containing a caret
by almut
in thread Matching patterns containing a caret
by stephanm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |