Backreferences don't work in character classes. Try this:
$ perl -e 'if ("aa\\"=~/(.)[^\1]/) { print "$&\n"}'
If backreferences work in character classes, we should see the output as a\.
In reply to Re^2: Pattern Matching
by Anonymous Monk
in thread Pattern Matching
by nwboy74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |