How to remove ^M (CRLF) from w file sent from Windows to linux FTP server in perl? -


i'm sending comma delimited file (in ascii) via net::ftp in perl (generated on windows) linux based ftp account. issue file on linux side has ^m @ end of each line. know can remove these calling dos2unix" command on file how remove ^m on windows side send correct file in first place.

i tried doing below doesn't affect file on linux side.

$content =~ s/^m//g; 

if had "^","m", s/\^m//g work. ("^" special in regex patterns.) if had cr, s/\r\n/\n/g (or s/\r//g) work.

if neither work, please provide portion of "od -c" of data file.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -