What about this:

if(!$response->is_success);

-----Original Message-----
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 7:30 PM
To: [EMAIL PROTECTED]
Subject: Opposite of $respose->is_success


Hey all,

Just wondering if any one know what the oposite of $response->is_success
in the code below?  I have tried $response->is_fail and
$response->is_failure.  I have also RTFM but I can't find anywhere what
the opposite is.  What I essentially want to do is if the site or page
($inputsite) can't be found I need an error to be returned.  Has any one
worked with any of these modules before or have any ideas on what I can
do here?


use LWP::UserAgent;
use HTML::TableExtract;
use HTML::TreeBuilder;

$inputSite = "mydomain.com";
$tree = HTML::TreeBuilder->new;
$address = "http://"; . $inputSite;
$request = HTTP::Request->new('GET', $address);
$response = $ua->request($request);
my $found = 0;

if($response->is_???) {
  Do ... # what is the opposite of $response->is_success ?
elsif ($response->is_success) {
  Do.. # Other stuff
}

regards,

Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------------------
This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to