Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl error

Status
Not open for further replies.

flipz79

Programmer
Joined
Apr 10, 2007
Messages
2
Location
US
Can anyone help what is wrong with the following code and how to fix it?

$r->no_cache(1);
my $x = length($form);
$r->content_type("text/html");
$r->headers_out->set("Content-length","$x")
$r->headers_out->set("Pragma", "no-cache");
unless (MP2) {
$r->send_http_header;
}
 
What problem/symptoms are you getting?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::PerlDesignPatterns)[/small]
 
something is wrong with the code and i believe its because i'm missing a semicolon on line 4!
 
this line doesn't look correct either:

Code:
unless (MP2) {

what is 'MP2' ?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Is MP2 a perl constant? I've never used one, but I think they might look like that. The semi-colon should certainly be there on line 4. Have you tried putting one in?

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::PerlDesignPatterns)[/small]
 
. . . and what kind of an object is $r?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top