To differentiate HTTP responses with a bit more granularity, use
$response->code or
$response->status_line:
#! usr/bin/perl -w
use strict;
use LWP::UserAgent;
$\ = "\n";
my $ua = LWP::UserAgent->new;
my $response = $ua->get('http://www.perlmonks.org');
print $response->code;
print $response->status_line;
# or more generally...
print "Success" if $response->is_success;
print "Error" if $response->is_error;
print "Info" if $response->is_info;
print "Redirect" if $response->is_redirect;
See the docs on
LWP::UserAgent and
HTTP::Response for more detail.