my $text = 'nicht escapet" und doch escapet\\"'; print "vorher : '$text'\n"; $text =~ s/(\\)"/\\"/g; print "nachher: '$text'\n";