"Roderick A. Anderson" <[EMAIL PROTECTED]> writes: > Back again. Getting more things solved but I can't find _anything_ on how > to build a HTML document in memory. All I really need is a method to POST > to a page with data I already have collected. I know the form inputs > already. HTML::Form and it's friends always expect a URI/URL to build an > object.
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;
