Re: hello world script not working.

by Satya <satyap(at)satya.virtualave.net>

 Date:  Mon, 10 Dec 2001 14:21:52 -0800 (PST)
 To:  hwg-languages(at)hwg.org
 In-Reply-To:  chronotope
  todo: View Thread, Original
On Dec 10, 2001 at 13:40, Christopher L. Filkins wrote:

>I have the following perl script:
>
>#!/usr/bin/perl

Check the path. Everything you wrote points to a bad shebang line.

>print "Content-type: text/html\n\n";
>print "hello world!\n";

If the path is correct, try outputting proper HTML. With tags and all.

>Permissions are set at 755

Correct.

>When I try and access it from a browser at /cgi-bin/script.pl I get
>a 500 error.  At the command line I get the following:

>%n@%m:%/> ./script.pl
>./script.pl: Command not found
>%n@%m:%/>

Indicating a bad shebang line.

>%n@%m:%/> perl -w script.pl
>hello world!
>%n@%m:%/>

type this:

$ which perl

And put that path in the shebang line.

-- 
Satya. <URL:http://satya.virtualave.net/>
http://cgi6.ebay.aol.com/aw-cgi/eBayISAPI.dll?ViewListedItems&userid=notjaph
If you are close enough to read this, you are also in phaser range

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.