> -----Original Message----- > From: Dave Adams [mailto:[EMAIL PROTECTED] > Sent: Friday, September 23, 2005 1:59 PM > To: beginners perl > Subject: Looking for perl scripts to remove ^M > > Sometimes I get perl scripts that were developed on windows and then > brought over to UNIX and the scripts contain all the pesky > metacharacters of ^M and excessive blank lines. > > Does anyone have a simple script to clean these files up or suggestions?
perl -pe 's/\r$//' oldfile > newfile > > My appreciation in advance, > DA > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>