On Tue, 29 Mar 2005, Chris Knipe wrote:
> if (!$Query->request_method() eq "POST") {
> exit;
> }
>
> Using a GET / HEAD method, the IF statement never executes.
Nor would it -- the exclamation point isn't in the right place.
This statement is saying "if not-$query->request_method() equals POST",
but "not-$query..." makes no sense.
But an exclamation point is the wrong approach here. If you want to say
that $foo should not equal $bar, use the "not equal" condition -- 'ne':
if $Query->request_method() ne "POST" {
exit;
}
That should do what you want.
--
Chris Devers
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>