Cure: Make this script on linux box, call it strip-dos, and run it make it executable first
~#chmod 700 strip-dos ~#./strip-dos file-name Creates a file called file-name.stripped so it doesn't mess with the origional. The magic is in the last line, if you want to type command each time just run that command. #!/bin/bash if [ "$1" = "" ] then echo "Usage: strip-dos <file-name>" exit fi #tr '\015' '\012' < $1 > $1.stripped tr '\015' ' ' < $1 > $1.stripped OR Use an editor that can save unix format files. A search of tucows should turn up a candidate. Homesite editor will save as DOS, Unix or Mac. Cheers Kevin ----- Original Message ----- From: "Glenn Cannon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 04, 2002 11:35 PM Subject: Strip Carriage Returns > Not strictly a perl question, I know, but... > > I have been writing and testing my perl script on a WinXP box, and I > have now moved it to its final home on a linux box. When I run perl -c > scriptname, I get the following: > > Illegal character \015 (carriage return) at index.pl line 2. > (Maybe you didn't strip carriage returns after a network transfer?) > > Is there a simple way to prevent/cure this? > > Glenn > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]