#!/usr/bin/perl use strict; use CGI; my $cgi = CGI->new(); print $cgi->header(); print < test

Please input data below

Name:
EOP use Data::Dumper; use HTML::Form; use LWP::UserAgent; if (my $data = $cgi->param('testdata')) { my $ua = LWP::UserAgent->new; print "got: " . $data; print "
"; my $html = "http://localhost/cgi-bin/test"; # http://localhost/y.cgi is where the socond form is submitted. my $form = HTML::Form->parse(< HTML $form->attr( 'test', $data); my $response = $ua->request($form->click); print Dumper $response; print "
"; } 1;