Andrew Allen
2008-Oct-13 16:00 UTC
[CentOS] Perl CGI scripts - stripping out unwanted carriage returns etc
I have a number of perl CGI scripts which I wrote some time ago (and which are working successfully on my website). I've set up a local server on which to do some development work on the scripts but I can't get them to work - the error log says: No such file or directory: exec of '/var/www/cgi-bin/script.cgi' failed Premature end of script headers: script.cgi etc By comparing two identical very simple cgi scripts (one works, the other doesn't), I've traced the problem to, apparently, unwanted carriage returns which have somehow got into the perl text files. Is there a quick and easy way (ie piece of software) to strip out these things, or do I have to do it manually? Thanks for any help, Andy
nate
2008-Oct-13 16:05 UTC
[CentOS] Perl CGI scripts - stripping out unwanted carriage returns etc
Andrew Allen wrote:> returns which have somehow got into the perl text files. Is there a > quick and easy way (ie piece of software) to strip out these things, or > do I have to do it manually?dos2unix
Maybe Matching Threads
- Unwanted carriage returns storing dataframes with dbWriteTable
- Embedded carriage returns in text document
- Carriage Returns in files after copying
- need to find (and distinguish types of) carriage returns in a file that is scanned using scan
- Carriage returns and Sweave output