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
Post a Comment