in reply to Pattern Matching

No it doesn't, \1 is a backreference to the first match.

[^\1>] means match anything that do not match $1 (the first match) or >

Update: See the answers below, I missed the character class thing.

Replies are listed 'Best First'.
Re^2: Pattern Matching
by Anonymous Monk on Jan 14, 2010 at 21:46 UTC

    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\.