#!c:\perl\bin\perl # Author: Walt Uotinen of Top Shelf Technologies (Clifton, NJ, USA) - 15 Feb. 2000 # Feel free to use and modify this Perl code... Walt # Bring the CGI.pm module into the picture: use CGI; # Use the 'new' method (subroutine) of the CGI class (package) to # create an object instance (code reference) of the CGI class (package): $cgi=new CGI; # Call the 'header', 'start_html' and 'h2' methods (subroutines) of the # CGI object instance (code reference) as items to be printed: print($cgi->header, $cgi->start_html("Form posting results"), $cgi->h2("You submitted the following 'name = value' pairs: ")); # When the 'param' method (subroutine) is called with no arguments, it returns a list # of form field names; when called with an argument, it returns the values of the named # field (see below): @field_names=$cgi->param(); # I think you'll figure out the rest... foreach $field_name (@field_names) { @field_values=$cgi->param($field_name); foreach $field_value (@field_values) { print($cgi->li("$field_name = $field_value \n")); } } print $cgi->end_html;