Alan Jiang <[EMAIL PROTECTED]> writes:

> I am writting a script that will send both querystring and form input
> data. I know how to do them seperately, but how do I submit them
> simultaneously?

You should be able to build your request object like this:

use HTTP::Request::Common qw(POST);
use URI;

my $uri = URI->new("http://www.xxx.com/foo");
$uri->query_form(a => 1, b => "foo");

my $req = POST($uri, [ foo => 'bar',
                       a => 2.5,
                     ]);

and then just send it off with $ua->request();

> Another question is where do I define the referrer variable (using the 
> user agent object?)

You have to set the $req->referer() on each request explicitly.

> I could have look them up in the manual, but I need some quick answers. 

Hmmm...

Regards,
Gisle

Reply via email to