boston_guy1 has asked for the wisdom of the Perl Monks concerning the following question:
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Cygwin perl... ftp... Windows line endings...
by Rhose (Priest) on May 07, 2003 at 20:09 UTC | |
Re: Cygwin perl... ftp... Windows line endings...
by halley (Prior) on May 07, 2003 at 20:06 UTC | |
by boston_guy1 (Initiate) on May 08, 2003 at 13:20 UTC | |
Re: Cygwin perl... ftp... Windows line endings...
by cciulla (Friar) on May 07, 2003 at 21:01 UTC | |
Re: Cygwin perl... ftp... Windows line endings...
by tachyon (Chancellor) on May 08, 2003 at 04:07 UTC | |
Re: Cygwin perl... ftp... Windows line endings...
by svsingh (Priest) on May 07, 2003 at 20:04 UTC | |
by boston_guy1 (Initiate) on May 08, 2003 at 13:21 UTC |
Back to
Seekers of Perl Wisdom