in reply to how to validate lwp::useragent request?

you can use LWP::DebugFile to debug your script and it allows you to see what your calls to LWP are doing behind the scenes. so you get more info than the headers. for browser, I use LiveHTTPHeaders, the firefox plugin to get the header.

sometimes, it's hard to mimic the request on the first try when remote use js,cookie,user-agent checking etc.

inspect the difference between sending request through browser and through LWP, then fill the difference in your perl script and try again.

oh, i found the headers_as_string is handy too. it ruturns the response header as string which may be suffice for you to check the return header. an example i use is to extract the url out of meta refresh from the response header (LWP only follow http 301,302,303,307 redirect)

use LWP; my $br = LWP::UserAgent->new; my $resp = $br ->get('http://www.pulse24.com'); print $resp->headers_as_string"; __END__ Client-Peer: 207.61.136.40:80 Client-Response-Num: 1 REFRESH: 0;URL=http://www.pulse24.com/Front_Page/page.asp X-Meta-Robots: noindex X-Powered-By: ASP.NET