#### #!c:\Perl\bin\perl.exe use warnings; use strict; use CGI::Simple; use CGI::Carp (qw(fatalsToBrowser)); my $q = CGI::Simple->new(); print $q->header; my $pwd = $q->param('pwd'); my $id = $q->param('id'); print " test mech

hi there

id: $id

pwd: $pwd

"; ##
## #c:/Perl/bin use warnings; use strict; use WWW::Mechanize; my $m = WWW::Mechanize->new( autocheck=>1 ); my $agent = LWP::UserAgent->new; $agent->cookie_jar(HTTP::Cookies->new); $m->get("http://localhost/monk.html"); my $r = $m->submit_form( fields => { id => "XXXXXXX", pwd => "YYYYYYY", } ); print $m->content; #### ---------- Capture Output ---------- > "c:\perl\bin\perl.exe" m.cgi test mech

hi there

id: XXXXXXX

pwd: YYYYYYY

> Terminated with exit code 0.