tommyelse has asked for the wisdom of the Perl Monks concerning the following question:
When it saves the web page to a file, I get the correct page, but on the very top of the page, is this codeuse LWP::UserAgent; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET=> 'http://www.linpro.no/secret/'); $req->authorization_basic('aas', 'mypassword'); print $ua->request($req)->as_string;
How do you get rid of that?HTTP/1.1 200 OK Connection: close Date: Wed, 20 Apr 2013 20:54:15 GMT +Pragma: no-cache Content-Length: 186386 Content-Type: text/html Clien +t-Date: Wed, 20 Apr 2005 20:54:24 GMT Client-Peer: 66.210.81.31:80 Cl +ient-Response-Num: 1 Refresh: 0360
Edited by Arunbear: Changed title from 'HTML', as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Stripping headers from a HTTP reply
by davidrw (Prior) on Apr 20, 2005 at 21:06 UTC | |
|
Re: Stripping headers from a HTTP reply
by eibwen (Friar) on Apr 21, 2005 at 00:48 UTC |