#!/usr/bin/perl -wT use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use strict; use Time::Local; use POSIX qw(strftime); use constant DEBUG => 0; use constant DEBUG => 1; use constant TRUE => 1; use constant FALSE => 0; use constant CR => "\n"; use constant TAB => "\t"; # Time of file generation. #-------------------------- my $pause; my $gendate = time; my @gendate = localtime($gendate); my $timestamp = sprintf("%04d.%02d.%02d_%02d%02d", $gendate[5] + 1900, $gendate[4] + 1, $gendate[3], $gendate[2], $gendate[1] ); print header; print start_html("Results"); # Set the PATH environment variable to the same path # # where sendmail is located: # $ENV{PATH} = "/usr/sbin"; # my $srv_nm=`/bin/hostname -s`; # $srv_nm.="$srv_nm\@eecs.wsu.edu"; my $REU_hm="http://reu.eecs.wsu.edu"; # open pipe to sendmail open (MAIL, "|/usr/sbin/sendmail -oi -t ") or &dienice("Can't fork sendmail: $!\n"); # define mail header # my $recipient = 'apg@eecs.wsu.edu'; my $recipient = 'XXXX@eecs.wsu.edu'; my $mail_from = 'reu@eecs.wsu.edu'; my $mail_subject = "REU Online Application"; print MAIL "To: $recipient\n"; print MAIL "From: $mail_from\n"; # print subject and a blank line to end header #---------------------------------------------- print MAIL "Subject: $mail_subject\n\n"; # body starts here... #------------------------- print MAIL "Local time @ file generation\: $timestamp" .CR; # foreach my $p (param()) { # print MAIL "$p = ", param($p), "\n"; # } my $form_A = { a1_name =>"1. Name: ", a1_xemail_address =>"2. Email adddress: ", a2_dob =>"3. Date of Birth: ", a3_citizenship =>"4. U.S. Citizen Permanent Resident: ", a4_hom_address00 =>"5. Home Address:" .CR, a4_hom_address01 =>TAB . "Street Address 1: ", a4_hom_address02 =>TAB . "Street Address 2: ", a4_hom_city =>TAB . "City: ", a4_hom_state =>TAB . "State: ", a4_hom_country =>TAB . "Country: ", a5_school00 =>"6. School Name and Address:" .CR, a5_school_name =>TAB . "School Name: ", a5_school_address01 =>TAB . "Street Address 1: ", a5_school_address02 =>TAB . "Street Address 2: ", a5_school_city =>TAB . "City: ", a5_school_state =>TAB . "State: ", a5_school_country =>TAB . "Country: ", a6_00 =>"7. Telephone Numbers:" .CR, a6_hom_fon =>TAB . "Home: ", a6_school_fon =>TAB . "School: ", a7_ref00 =>"8. Names of References:" .CR, a7_ref01 =>"Name: ", a7_ref02 =>"Name: ", a7_ref03 =>"Name: ", }; my $form_B = { b1_gpa =>"1. Current cumulative GPA: ", b2_major =>"2. Major: name ", b3_credits =>"3. Number of credit hours completed: ", b4_class =>"4. Classification in Fall 2007 semester: ", b5_accomplishments =>"5. Academic and Extracurricular Accomplishments" . CR . TAB . TAB . "(including awards, prizes, scholarships): " . CR, b6_group_work =>"6. Briefly explain any team work or group project you have been" . CR . TAB . TAB . "involved with:" . CR, b7_cs_experience =>"7. Computer Systems, Programming Languages, and" . CR . TAB . TAB . "Operating Systems Experience:\n", }; my $form_C = { c1_goals =>"1. Career Goals:" .CR, c2_memberships =>"2. Memberships in clubs, groups, and societies:" .CR, c3_add_info =>"3. Please indicate any additional information which you" . CR .TAB .TAB. "consider to be helpful for your application:" .CR, }; print MAIL "##################################################" .CR; # $value = param('fieldname'); print MAIL " A. Personal Information:" .CR; print MAIL "--------------------------" .CR .CR; for my $form_key (sort keys %$form_A) { my $value = param($form_key); print MAIL "\t $form_A->{$form_key}"; if (defined $value) { print MAIL "$value".CR; } else { print MAIL CR; } } print MAIL CR . " B. Academic Background:" .CR; print MAIL "--------------------------" .CR .CR; for my $form_key (sort keys %$form_B) { my $value = param($form_key); print MAIL "\t $form_B->{$form_key}"; if (defined $value) { print MAIL "$value".CR; } else { print MAIL CR; } } print MAIL CR . " C. General:" .CR; print MAIL "-------------" .CR .CR; for my $form_key (sort keys %$form_C) { my $value = param($form_key); print MAIL "\t $form_C->{$form_key}"; if (defined $value) { print MAIL "$value".CR; } else { print MAIL CR; } } print MAIL "##################################################" .CR; # Close MAIL input stream so message gets mailed. close(MAIL); # print a thank-you page #

Return to our home page

print < Research Experiences for Undergraduates in Smart Environments at Washington State University

School of Electrical Engineering and Computer Science

Research Experiences for Undergraduates



Thank you for applying to the REU program.
The REU directors will notify you when a decision has been made.

School of EECS, PO BOX 642752, Washington State University, Pullman, WA, 99164-2752 USA, 509-335-6602, Contact Us
EndHTML print end_html; # The dienice subroutine handles errors. sub dienice { my ($errmsg) = @_; print "

Error

\n"; print "

$errmsg

\n"; print end_html; exit; }