develooper Front page | perl.beginners | Postings from April 2002

RE: I can't get this to run!

Thread Next
April 27, 2002 15:20
RE: I can't get this to run!
Message ID:

> I can't get this cgi script I downloaded to run...
Try checking the file for ^Ms at the end of the line with:
$ cat -v /usr/lib/cgi-bin/agbot/agbot.cgi

I think you will find that it will have:

Then you will have to strip off all the ^Ms from all the lines with:
$ perl -pi.bak -e 's/\^M//g' agbot.cgi
Note: For the ^M you will need to key Ctrl+v and then Ctrl+m this should
then print ^M
This will strip off the ^Ms and create a backup file called agbot.cgi.bak

>  $ perl /usr/lib/cgi-bin/agbot/agbot.cgi

> and it works just fine..  Huh?  I don't get it..
That's because the shebang line is ignored when you prefix the script with
the perl command.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.351 / Virus Database: 197 - Release Date: 19/04/2002

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About