[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CR-LF translator hunt..

Kjell Wooding wrote:
> >I am attempting to translate a text file from a windows/dos CR/LF linebreak
> >setup to either a) unix LF only, b) Macintosh, CR only, or c) some other
> >text entirely at the end of each line (for importing into a database).
> perl -pi -e 's/\r\n/\r/' filename

for mac -> unix, I like the 2nd prize winner in the Most Powerful
category of the 0th Obfuscated Perl Contest (entered by Gordon Lack):

#!/usr/bin/perl -w015l12pi.bak