my $userPass = base64("user:password"); # Need two \n in the get request my $get =<new( Proto => "tcp", PeerAddr => $host, PeerPort => $port, ) or return $!; print $http_request $get; # Write the request my $webPage; { # Grab the output local($/) = undef; $webPage = <$http_request>; } return $webPage;