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();
In reply to can't call method 'protocol' by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |