##
#!/usr/bin/perl -w
# Copy form data from the environment variable
$form_data = $ENV{'QUERY_STRING'};
$form_data =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C",hex ($1))/eg;
# Replace the + char with space char.
$form_data =~ s/\+/ /g;
# Split $form_data into name/value pairs
@fields = split (/&/, $form_data);
# Init script variables with form data values
# $form_name is the name from the form.
# from the text fields...
($form_name, $candidate) = split (/=/, $fields[0]);
($form_name, $position) = split (/=/, $fields[1]);
($form_name, $education) = split (/=/, $fields[2]);
$form_name > dataform.html
# Send back to the user a confirmation.
print << "END_OF_REPLY";
END_OF_REPLY
Confirmation Mesg
Thanks $first!
We'll send you your: $status.
END_OF_REPLY
## ##