my $url = new URI( $myhttpAddress ); my $host = $url->host; my $port = $url->port || 80; my $path = $url->path || "/"; my $socket = IO::Socket::INET->new( PeerAddr => $host ,PeerPort => $port ,Proto => 'tcp' ,Type => SOCK_STREAM ); die "failed to establish socket\n" unless $socket; $socket->autoflush(1); print $socket "GET $path\n", "Host: $host\n\n"; $firstRec = <$socket>; if ( defined $firstRec ) { print "$firstRec\n"; while ( <$socket> ) { print "$_\n"; }; };