#!/usr/bin/perl -w use strict; #### $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]); #### use CGI; my $q = new CGI; my $candidate = $q->param('candidate'); my $position = $q->param('position'); my $education = $q->param('education'); #### $form_name > dataform.html #### open(OUT, "> dataform.html") or die "Can't open file: $!"; print "Candidate: $candidate\n"; print "Position: $position\n"; print "Education: $Education\n\n"; close OUT;