See the docs on LWP::UserAgent and HTTP::Response for more detail.#! 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;
In reply to Re: Help needed on HTTP redirects
by Mr_Jon
in thread Help needed on HTTP redirects
by pheonix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |