in reply to Removing Carriage returns from text files

Are you certain you can't do it on the Unix side? This works very nicely for me from a prompt in Linux:
$ cat dosfile.txt | col -b > unixfile.txt
Sorry I don't have a Perl solution any better than those given.

Replies are listed 'Best First'.
Re: Re: Removing Carriage returns from text files
by tommyw (Hermit) on Oct 18, 2001 at 03:23 UTC

    No, no, no, no, no!

    Cat a single file into a pipe is simple evil and wasteful. You meant to write:

    col -b < dosfile.txt > unixfile.txt

Re: Re: Removing Carriage returns from text files
by Kalimeister (Acolyte) on Oct 18, 2001 at 00:29 UTC
    Thanks for taking the time to answer my questions. Unfortunately the ftp'ing is all part of a script that our builds department runs to collect all the files it needs for a given build and they don't have the time to go through and search for all the .txt files and then make them unix. I guess we are stuck with the vb tool.
    This is the first Perl discussion group I have found and I must say I have been very impressed with the speedy and helpful responses! Thank you muchly.

    Kalimeister