It will convert PC or Mac text files to Unix format. I see that you could rewrite it with a -p swithc and dispense with the while but I will leave that as an exercise.#!/usr/bin/perl -w -i while (<>) {s/\r\n*/\n/g; print;}
Regards,
Helgi Briem
In reply to Re: Re: Removing Carriage returns from text files
by helgi
in thread Removing Carriage returns from text files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |