my $match = "\\well"; my $text = "\\well don't you know it"; $text =~ s/$match//; print "$text\n"; example 2. $text = "\\well don't you know it"; $text =~ s/\\well//; print "$text\n";