What's new

Perl Help (1 Viewer)

ThomasC

Senior HTF Member
Joined
Dec 15, 2001
Messages
6,526
Real Name
Thomas
When I'm trying to run this script, I get the following error in the browser:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

I don't get any syntax errors when I go to the command line and run "perl -c test.pl", but when I run "perl -w test.pl", I get the following error:

Use of uninitialized value in string at test.pl line 26.

If I change line 26 to print OUTFILE "5";, the script runs fine and it works. Can anyone help me out, or suggest another forum to present my problem to? Thanks.

 

John Mansor

Stunt Coordinator
Joined
Jan 9, 2003
Messages
218
For some reason $test is not getting created correctly. My guess would be something is wrong in your param() call when you are setting the value of $test.

I would set $test = "5" to see if param() is the problem.
 

Gary Seven

Grand Poo Pah
Senior HTF Member
Joined
Aug 15, 2003
Messages
2,161
Location
Lake Worth, Florida
Real Name
Gaston
Typically I do something like this...

use CGI qw(:cgi-lib :standard);

$qry=new CGI;

$test = $qry->param("testvar");

Try that.
 

Users who are viewing this thread

Sign up for our newsletter

and receive essential news, curated deals, and much more







You will only receive emails from us. We will never sell or distribute your email address to third party companies at any time.

Forum statistics

Threads
357,059
Messages
5,129,768
Members
144,281
Latest member
acinstallation240
Recent bookmarks
0
Top