#!/usr/bin/perl -i -p use strict; use warnings; # We only need to use "\&'" or "\&." at the start of a line. s/(?<=.)\\\&(['.])/$1/g; # Some quotes turn into open/close quotes. s/'(.)'/\\(oq$1\\(cq/g; s/(^|[ (])"(?!( |$))/$1\\(lq/gm; s/(?