On 16 Oct 2003, Gisle Aas wrote: Thanks. This looks way easier than what I was trying to do. The only difference I'll have to do is build the form(?) with a loop since I have all the name/values pairs in a hash. But that isn't a problem.
Thanks for the input. Rod -- > It sounds like you want to use the POST() function from > HTTP::Request::Common. > > If you want to use HTML::Form you can do something like this. > > #!/usr/bin/perl -w > > use strict; > use LWP; > use HTML::Form; > > my $form = HTML::Form->parse(<<EOT, "http://search.cpan.org"); > <form action=search> > <input name=query> > <input name=mode value=dist> > </form> > EOT > > # set up the query > $form->param(query => shift || "libwww-perl"); > > # do the search > my $res = LWP::UserAgent->new->request($form->click); > print $res->as_string; > -- "Open Source Software - Sometimes you get more than you paid for..."
