Then if you want to process HTML data from a page, I recommend you use HTML::TreeBuilder, for example as :use WWW::Mechanize ; my $m = WWW::Mechanize->new ; my %conf = ( foo => bar ) ; $m->get("http://your.url/") ; die $m->res->status_line unless $m->success ; # Choose form number $m->form_number(1) ; # Fill $m->set_fields( %conf ) ; # Submit $m->submit ; die $m->res->status_line unless $m->success ; # If the form sends you somewhere, you can catch it : my $url = $m->response->request->uri->as_string ;
$m->get("$url") ; die $m->res->status_line unless $m->success ; my $tree = HTML::TreeBuilder->new_from_content( $m->content ) ;
In reply to Re: how to submit html form?
by gu
in thread how to submit html form?
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |