in reply to Inserting a single-quote into a file
Yup, it's a shell quoting problem. Switch up the quotes:
..works fine.
perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'