I am trying to remove lines in a file that contain 2 strings.
I am using:
perl -i.tmp -ne "print unless /$STRING_A/ and /$STRING_B/" /foo/bar/file.txt
The result is that all lines from the file containing
$STRING_A are deleted regardless if
$STRING_B is also in the same line.
What is the problem here? How can I fix this?