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.
In reply to Re: unwanted ^M during print in file
by Skeeve
in thread unwanted ^M during print in file
by Khatri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |