Re: [MacPerl-WebCGI] need help with My first perl program

[email protected] (Detlef Lindenthal) Fri, 23 Aug 2002 22:27:32 +0200
Newsgroups perl.macperl.webcgi
Message-ID <[email protected]>

Bill Becker wrote:

> Detlef Lindenthal wrote:
> >A statement
> >    . test.pl
> >means: The lines of the file "test.pl"
> >are interpreted as UNIX statements.
> >But UNIX won't understand Perl statements.
>
> Yes it will, because the first line of his script is the
> hash-bang/path of the perl interpreter.
>
> In general, this will work with nearly any unix. Even the OS/390 USS
> understands it.

Hi Bill,

maybe you are right; but on my brandnew Suse Linux
this does not work; has some switch to be flipped?

- - - - - - - -

Hi Liming,

to have a Perl script work via Internet ,the first three lines
should read thus:

   #!/usr/bin/perl
   print "content-type: text/html\n\n";
   print "Hallo Welt!";

AND right permission
AND right cgi-bin folder (as mentioned before).

With
    locate error_log
you might locate the error logs of your server and of perl.
In Suse Linux that file resides on
    /var/log/httpd/error_log
so by means of
    tail -20 /var/log/httpd/error_log
I can read the 20 youngest error messages of it.

Greatings,
Detlef Lindenthal