in reply to Use of unitialized variable?
No link checker I've found will check for the /pool/images/psyche//butt_index.gif image, except for the spagetti I'm having to work with right now. :) Anyhow, here's the changes I made to the gethtml subroutine for your critique:<script language=javascript><!-- if (document.images) { navigation = new makeimgarray(9) navigation_mo = new makeimgarray(9); navigation[1].src = "/pool/images/psyche//butt_index.gif"; navigation_mo[1].src = "/pool/images/psyche//butt_index.mo.gif"; ... </script>
#/usr/bin/perl -w #gethtml.pl : HTML fetch and return. 28 AUG 2000 use Socket; use strict; sub gethtml { my $my_url = ($_[0]); my $my_host=''; my $my_request=''; my $my_html_return=''; ($my_host, $my_url) = ($my_url =~ m#(.*?)/(.*)#); $my_request = "GET \/$my_url HTTP/1.0\nAccept: */*\nHost: $my_host\nUs +er-Agent: WebMangle/1.0\n\n"; socket(MY_SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || retu +rn "Error: $!"; connect(MY_SOCKET, sockaddr_in(80,inet_aton($my_host))) || return "Err +or: $!"; send(MY_SOCKET, $my_request, 0x0); while(<MY_SOCKET>) {$my_html_return .= $_;} close MY_SOCKET || return "Error: $!"; return $my_html_return; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) RE: Re: Use of unitialized variable?
by jeffa (Bishop) on Aug 29, 2000 at 05:37 UTC | |
by merlyn (Sage) on Aug 29, 2000 at 05:40 UTC | |
by jeffa (Bishop) on Aug 29, 2000 at 05:52 UTC | |
by merlyn (Sage) on Aug 29, 2000 at 05:55 UTC | |
by jeffa (Bishop) on Aug 29, 2000 at 05:59 UTC | |
|