Add space after the '--' in quotes: perl -wp -e 's/--(\S)/-- /g'