in reply to unwanted ^M during print in file

Try putting s/\cM//g in front of the print

The reason for the ^M is that a line end in certain OSs and (AFAIK) in HTTP is coded as CRLF. I used \cM instead of \r to show you how to code Control-Characters into strings.


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e