> -----Original Message-----
> From: Chris Knipe [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 29, 2005 10:45 AM
> To: beginners@perl.org
> Subject: CGI.pm
> 
> Lo all,
> 
> Very quickly....
> 
> #!/usr/bin/perl
> use CGI;
> use strict;
> use warnings;
> 
> my $Query = new CGI;
> if (!$Query->request_method() eq "POST") {
>   exit;
> }
> 
> Using a GET / HEAD method, the IF statement never executes.  
> I am trying to verify the user agent, but the above is just 
> for my test - which is failing.
> 
> Anyone got some clues?
> 
> --
> Chris.
> 
> I love deadlines. I especially love the whooshing sound they 
> make as they fly by..." - Douglas Adams, 'Hitchhiker's Guide 
> to the Galaxy' 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 

Untested:

if ($query->request_method() =~ m/^post$/i)     {
        do something;
}

Chris

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to