use LWP::Simple;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
use HTML::LinkExtor; # allows you to extract the links off of an HTML page.
print "Content-type: text/html\n\n"; # this is just for testing
#
my $url = 'http://www.example.com/portal/pw/index.html';
my $content = get $url;
die "Couldn't get $url" unless defined $content;
>>>>>>>>>>>>>>
When I run the script I am getting 'Couldn't get http://www.example.com/portal/pw/index.html'. As I said above if I try the same script to get a different web page (e.g. http://www.example.co.uk/index.html) it works ok.
Rgds
Denis
[edited by: jatar_k at 11:41 am (utc) on Oct. 12, 2008]
[edit reason] please use example.tld [/edit]
try using LWP::UserAgent methods instead:
use LWP::UserAgent;
print "Content-type: text/html\n\n"; # this is just for testingmy $ua = LWP::UserAgent->new;
my $response = $ua->get('http://www.example.com/portal/pw/index.html');if($response->is_success){
print $response->decoded_content;
}else{
die $response->status_line;
}