Use of uninitialized value at ./gethtml.pl line 16, chunk 1. #### #/usr/bin/perl -w #gethtml.pl : HTML fetch and return. 28 MAR 2000 rev 1 use Socket; use strict; sub gethtml { my $my_url = $_[0]; my ($my_host, $my_request, $my_html_return) = ''; ($my_host, $my_url) = ($my_url =~ m#(.*?)/(.*)#); $my_request = "GET \/$my_url HTTP/1.0\nAccept: */*\nHost:$my_host\nUser-Agent: WebMangle/1.0\n\n"; socket(my_socket, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || return "Socket Error: $!"; connect(my_socket, sockaddr_in(80,inet_aton($my_host))) || return "Connect Error: $!"; send(my_socket, $my_request, 0x0); while() {$my_html_return = $my_html_return . $_;} #above line is the offending one close my_socket || return "Close Error: $!"; return $my_html_return; } 1;