On Tue, 24 Oct 2000, junkmail wrote:

>     Hey, so I'm having a weird problem maybe someone can help me with.
> I have a simple perl script named test.cgi that generates html (ie a cgi
> script) which looks like
> 
> #!/usr/bin/perl
> # hello.pl -- my first perl script!
> print "Content-type: text/html\n\n";
> 
> If I type "perl test.cgi" (minus the quotes) the perl script runs.  If I
> type "./test.cgi" I got the error "bash: ./test.cgi: No such file or
> directory"

If you type "whereis perl", what do you get? Did you install perl from the
rpm or did you compile it yourself? If you compiled it yourself, the perl
binary will likely be in /usr/local/bin

> If I remove the #!/usr/bin/perl line from the beginning of the perl script
> and "./test.cgi" again it runs but gives a lot of file not found errors.

Of course, if you remove the first line, it tries to execute as a bash
script =)

> I'm guessing that somewhere there is an environment variable I am missing or
> something...  I have perl 5.6 installed and Mandrake 7.1 with the 2.2.16
> kernel.
> Any suggestions???
> 
> Thanks
> 
> Sam
> 
> 
> 


------------------------------------------------------------
Jean-Michel Dault <[EMAIL PROTECTED]>
MandrakeSoft inc, Montreal (Canada)
HTCPCP/1.0 Developper  (http://www.ietf.org/rfc/rfc2324.txt)


Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.

Reply via email to