Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use LWP::Simple; use CGI qw/:standard/; print header, start_html(); use CGI::Carp qw(fatalsToBrowser); my $use_stopwords = 0; my @stopwords = qw(I a about an are as at be by com de en for from how + in is it la of on or that the this to was what when where who will with und the www); #$line =~ s/\bQ$_\E\b/ **** /gi for @badwords; # james blunt you're beautiful my $url = "http://www.w3schools.com/html/html_primary.asp"; ####################################### # Gather response and header codes ####################################### my $response = head($url); my $responseline = $response->protocol(); # immediate error is here my $responsecode = $response->status_line(); my $header = $response->headers_as_string();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can't call method 'protocol'
by borisz (Canon) on Mar 26, 2006 at 19:16 UTC | |
|
Re: can't call method 'protocol'
by GrandFather (Saint) on Mar 26, 2006 at 19:16 UTC |