in reply to using a scalar in a regex with backslashes

This problem occurs so much it should be considered a FAQ. If you want to use a variable as a regex, you must remember that it is what's in the string that matters, not what you typed to produce that string. The string contains / should contain what you would write literally in the regex. So, wat do you expect to see if your do:
my $match = "\\well"; print $match;
? Well: it prints
\well
So doing
my $match = "\\well"; $text =~ s/$match//;
is, more or less (apart from the fact that the regex can be altered at runtime), equivalent to writing:
$text =~ s/\well//;
and /\w/ can match any letter, which is the effect you see: match a word character followed by "ell". For your string this deletes the word "well".

Conclusion: if you want to match a literal backslash, the regex/string should contain two backslashes, so the source code to produce the string should contain 4:

my $match = "\\\\well"; $text =~ s/$match//;
One way around this is to use qr//:
my $match = qr/\\well/; $text =~ s/$match//;
In this case, what you type is what you get — including any present or missing modifiers.

p.s. If you load the pattern(s) for a regex from a text file, you won't have this problem, as what is in the file is what will be in the pattern.