in reply to memory variables (chp. 9 & 10 Learning Perl 3)

First, the backreference is just \1; the last / is part of the m// or s/// operator.

As for the difference between \1 and $1, the \1 is used within the same regex as the capturing parens, while the $1 is used outside the regex.

For example, in:

if (m/(\w+)\1/) { print "Found $1 twice\n"; }
the \1 matches whatever was matched in the () within the same regex, and the $1 refers to the same matched item, but outside the regex.

Hope this clears it up a bit.