in reply to https request causes segmentation fault

You are also not checking the return value of head() here. It may provide you with more information if you provided a catch in here of some sort (die, warn, carp, etc).

(my (undef, undef, undef, undef, $server) = head($url)) or die "Document Header Error: $!";

You may also want to try running the script within the perl debugger and see if you are provided with any more useful information.