Re: Strip Carriage Returns

2002-04-04 Thread Kevin Hancock
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

Re: Strip Carriage Returns

2002-04-04 Thread Chas Owens
On Thu, 2002-04-04 at 09:05, Glenn Cannon wrote: > 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 char

Re: Strip Carriage Returns

2002-04-04 Thread Elaine -HFB- Ashton
Glenn Cannon [[EMAIL PROTECTED]] quoth: *> *>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? Several. Most modern Unixes have 'dos2unix' available or you can use P

RE: Strip Carriage Returns

2002-04-04 Thread John Edwards
How did you move the file? File copy? FTP? *nix systems use line feeds at the end of lines in text files. Windows systems use LF\CR. Or the other way round. That's the cause of your problem anyway. One way of solving it is to FTP the file to the box in asci mode, I believe. This might help htt