[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] #! is not interpreted



Oliver Schlag wrote:
> 
> whats the error message if you try to run it from the shell without perl ?
> File not found or something similar ? Try it with ./test.cgi :-)

I think my english had become very worse, it's difficult to 
explain the problem. Of course the script is found, every 
print "test test"; is done but I get an error if the line
has perl specific commands.

#!/usr/bin/perl
# show the web server environmental variables

print "Content-type: text/plain\n\n";
foreach $k (keys %ENV) {
  print "$k=$ENV{$k}\n";
};
print "Perlversion: $]";


perl test.cgi     does everything
test.cgi          just do the print statement