1 use PadWalker qw(peek_my peek our peek sub closed over); 2 3 print <; 11 print "What is your Social Security Number (xxx-xx-xxxx): "; 12 read(STDIN, $social number, 11); 13 print "$social_number\n"; 14 if ($social number !~ m/"[\d] {3}-[\d] {2}-[\d] {4)$/) { 15 print "Not a valid social."; 16 exit; 17 } 18 else { 19 20 print < "c Language", 29 "lUNX1B" => "Intro to UNIX", "3SH414" => "Shell Programming", "4PL400" => "Perl Programming" ); 30 31 while( ($key,$value) = each(%elective) { 32 print "$key I $value\n"; 33 print x 30, "\n"; 34 } 35 } 36 print "\nWhat is the EDP number of the course you wish to take ?:"; 37 chomp ($class_id = ; 38 print "$class_id\n"; 39 print "You will be taking ",$elective{$class id}," this semester.\n" 40 if exists $elective{$class id}; 41 print "This course number does not exist.\n" 42 if not exists $elective {$class id}; OUTPUT: REGISTRATION INFORMATION FOR SPRING QUARTER Today's date is Wed Apr 19 17:40:19 PDT 2007 Please enter the following information: Your full name: John Smith What is your Social Security Number (xxx–xx–xxxx): 101-42-4135 101-42-4135 Your address: Street: 1424 Hobart St. City, State, Zip: Chico, CA 95926 "EDP" NUMBERS AND ELECTIVES: 1UNX1B | Intro to UNIX ______________________________ 4PL400 | Perl Programming ______________________________ 2CPR2B | C Language ______________________________ 3SH414 | Shell Programming ______________________________ What is the EDP number of the course you wish to take ?: This course number does not exist.