http://www.perlmonks.org?node_id=551013


in reply to how to add a refer to LWP::UserAgent

You can set the Referer in the HTTP::Request object:

use HTTP::Request; use LWP::UserAgent; + my $agent = LWP::UserAgent->new(); + my $req = HTTP::Request->new(GET => 'http://localhost' ); + $req->referer('http://localhost/'); + my $response = $agent->request($req);

/J\