boston_guy1 has asked for the
wisdom of the Perl Monks concerning the following question:
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.