http://www.perlmonks.org?node_id=792626

oalvi has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have the following code which I'm using for monitoring URLs:
# !C:\Perl\bin use strict; use warnings; use LWP::UserAgent; #my $wsr = LWP::UserAgent -> new; #$wsr -> timeout( 20 ); my $url = shift or die "URL expected\n"; my $useragent = LWP::UserAgent->new; $useragent->proxy(['http', 'ftp','https'], 'http://192.168.5.5:8080/') +; $useragent -> timeout( 20 ); my $request = HTTP::Request->new( HEAD => $url ); my $response = $useragent->request($request); print $response->status_line, "\n";

It works fine for most URLs, http or https. However for some URLs, which function fine from the explorer, I get errors as follows:

https://elmag.elm.com.sa

500 Internal Server Error

https://www.etv.com.sa

500 Internal Server Error

Other https addresses work fine, for example

https://eserve.com.sa

200 OK

Looking forward to your support and assistance.