$ cat ssl.t use strict; use warnings; use Test::More; use LWP::UserAgent; my @hostnames = ( 'google.com', 'microsoft.com', 'bing.com' ); plan tests => 1 + scalar @hostnames; cmp_ok ($LWP::UserAgent::VERSION, '>=', 6.04, 'LWP is at least fairly recent'); my $ua = LWP::UserAgent->new; for my $host (@hostnames) { my $res = $ua->head ("https://$host/"); is ($res->code, '200', "$host returns 200") } $ prove -v ssl.t ssl.t .. 1..4 ok 1 - LWP is at least fairly recent ok 2 - google.com returns 200 ok 3 - microsoft.com returns 200 not ok 4 - bing.com returns 200 # Failed test 'bing.com returns 200' # at ssl.t line 19. # got: '405' # expected: '200' # Looks like you failed 1 test of 4. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests Test Summary Report ------------------- ssl.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 4 Non-zero exit status: 1 Files=1, Tests=4, 2 wallclock secs ( 0.04 usr 0.02 sys + 0.33 cusr 0.02 csys = 0.41 CPU) Result: FAIL