Hi There, I have a very peculiar problem. I am using Cygwin perl Version 5.6.1 on win2k system. I am trying to FTP Windows ASCII/Text files to unix. I am getting windows line endings at the end of each line in the files that have been ftp'd using Net::Ftp module. These are CR/LF. I dont want them to appear in the files that have been ftp'd onto unix. I want to remove them. I know there are some tools out there that would remove this for me. But i want to use them as the last resort. And i am approaching this forum to get any inputs on this. If anyone could throw some light as to how i could convert a windows file with windows line ending to windows file with unix line endings before fpt'ing it accross to unix. Or to remove the windows line endings in general. I know of another way using "tr". But i dont want to use this either. As this is on a file by file basis. I wanted to know if there is any environment variable or any other way out with which i make minimal changes to my perl script and achieve the objective. Reason i am saying this is, my perl script has 100's of such files(ascii) being ftp'd and i have to add tr ahead of each one of them as it doesnt work for a bunch of files or using a wild character. Any further info, please dont hesitate to post your responses. Thanks in advance for your time. K

In reply to Cygwin perl... ftp... Windows line endings... by boston_guy1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.