I'm using the following script, but getting unexpected output.
perl -pi -e '/DB_CHARSET/ and $_.="define('SOMETHING'/, true);\n"' file.txt
This command adds
Since the text starts with ' then have " inside, how do I escape 'SOMETHING so that I end up with
I've tried usual \ and it did not help.