#! /usr/bin/perl -w print "Content-type: text/html\n\n"; use CGI; use IO::File; use XML::Simple; my %form; my $cgi = CGI->new; foreach my $field ($cgi->param()) { $form{$field} = $cgi->param($field); } my $hash_ref = \%form; my $output = new IO::File(">out.xml"); my $xml = XML::Simple::XMLout($hash_ref, OutputFile => $output); $output->close(); #### Report

Text Box:


Check Box:
Red

Blue

Radio Button
True

False