When writting perl script my first line also includes a -w
like so:
#!/usr/bin/perl -w

This very important switch tells Perl to produce extra warning messages about
potentiallydangerous constracts.  You should always develop your programs under
-w

See Learning Perl(O'Reilly)2nd edition page 5.

By the program runs for me with out any problems.

Don .... 

On Tue, 24 Oct 2000, you 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";
> print <<"EOF";
> <HTML>
> <HEAD>
> <TITLE>Hello, world!</TITLE>
> </HEAD>
> <BODY>
> <H1>Hello, world!</H1>
> </BODY>
> </HTML>
> EOF
> 
> 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 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.
> 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
> 
> 
> 

----------------------------------------
Content-Type: text/plain; name="message.footer"
Content-Transfer-Encoding: 8bit
Content-Description: 
----------------------------------------

-- 
73 de KK6WJ

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

Reply via email to