use strict; use warnings; use CGI qw(:standard); print header(), start_html(), start_form(), textfield('new_primer_type'), submit('submit'), end_form(), end_html(), ; if (param('submit')) { print hr, p('You submitted ', param('new_primer_type')) ; } #### use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); my $url = 'http://unlocalhost.com/cgi-bin/script.cgi'; $mech->get($url); die "Couldn't get page\n" unless $mech->success; $mech->form_number(1); die "Couldn't set form\n" unless $mech->success; $mech->field('new_primer_type', 'dummy1'); die "Couldn't set type\n" unless $mech->success; $mech->click('submit'); die "Couldn't click submit\n" unless $mech->success;