perl -wle '$_ = "... \\ ..."; s/\\/\$\\backslash\$/; print' ... $\backslash$ ...