Finish the script!
homencsa resources partnershipsoutreachsoftware_tech
alliance searchinside ncsa adv_computingsciencedivisions
left up right comment

Finish the script!

With this, we're done!
 
################################################################ 
# construct the headers 
################################################################ 
print(MAIL "To: recipient\n"); 
if ( ! $cgiVals{'subject'} ) { 
    $cgiVals{'subject'} = "(no subject)"; 
} 
print(MAIL "Subject: $cgiVals{subject}\n"); 
if ( ! $cgiVals{'from'} ) { 
    $cgiVals{'from'} = "nobody"; 
} 
print( MAIL "From: $cgiVals{from}\n"); 
# done with the headers.  Add the blank line. 
print( MAIL "\n"); 
 
################################################################ 
# construct the body 
################################################################ 
foreach $key ( keys(%cgiVals) ) { 
    if ( $key eq "to" || $key eq "subject" || $key eq "from" ) { 
	next; 
    }  
    print( MAIL "$key: $cgiVals{$key}\n"); 
} 
################################################################ 
# All done.  Clean up. 
################################################################ 
close(MAIL); 
# the response. 
print("Form submitted successfully.  Thanks!"); 
exit(0); 

left up right comment



NCSA
The National Center for Supercomputing Applications

University of Illinois at Urbana-Champaign

johnsonb@ncsa.uiuc.edu

Last modified: June 19, 1997



Retrieved by Memoweb from http://www.ncsa.uiuc.edu/General/Training/PerlIntro/example5.html at 08/02/99