If you want to be more specific and substitute only the matching text inside double quotes you could use something like this (assuming all double quotes are balanced):
#!/usr/bin/perl
use warnings;
use strict;
my ($str, $x) = 'AND DNA OR ("rna AND binding AND protein")';
$str =~ s/(?<=")([^"]*)(?=")/($x = $1) =~ s|AND||g;$x/ge;
print $str, "\n";
It should not substitute AND everywhere only inside a double quoted string but above example it is substituted in the beginning. ( AND DNA OR ("rna binding protein")) which is not correct.
The requirement is the AND operator should be substituted only where there is a double quoted string.