You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
743 B
Perl

use LWP::Simple;
use URI::URL;
$url = url('http://www.yourserver.com/cgireader.cgi');
$url->query_form(text1 => 'Hello', text2 => 'there');
$html = get($url);
print $html;
#File: cgireader.cgi
#!/usr/local/bin/perl
use CGI;
$co = new CGI;
print $co->header,
$co->start_html(
-title=>'CGI Example',
-author=>'yourName',
-BGCOLOR=>'white',
-LINK=>'red'
);
if ($co->param()) {
print
"You entered this text: ",
$co->em($co->param('text1')),
" ",
$co->em($co->param('text2')),
".";
} else {
print "Sorry, I did not see any text.";
}
print $co->end_html;