programming-examples/perl/CGI/Demonstrates use of CGI.pm with HTML form.pl
2019-11-15 12:59:38 +01:00

14 lines
358 B
Perl

use warnings;
use strict;
use CGI qw( :standard );
my $word = param( "word" );
print header(), start_html( 'Using CGI.pm with forms' );
print p( 'Enter one of your favorite words here: ' );
print start_form(), textfield( "word" );
print submit( "Submit word" ), end_form();
print p( 'Your word is: ', b( $word ) ) if $word;
print end_html();