Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

8. PERL a. Show code to validate a course number (e.g., CS3423, MAT1214) which i

ID: 3593261 • Letter: 8

Question

8. PERL a. Show code to validate a course number (e.g., CS3423, MAT1214) which is in the variable $course. It must begin with either two or three uppercase alphabetic characters followed by 4 digits. The first digit must be between 1 and 6. The last digit must be between 1 and 4. The other two digits can be any digit. Also, place the department in $dept and the number in num. b. For each of the specified values and patterns, what are the results? show the value of $1 or NP (not populated) if the pattern didn't match. Show spaces as . il Seq Value 1 "the last of the best" m/(the. s)/ Pattern 2 "the last of the best"m/([a-z]*s/ "the last of the best- Im/(*aeiou)-s([aeioul.), "the last of the best/sw 3 4 c. Use Perl to do that same awk problem. Pass in the file name and user name. $perl rev8c.pl revIn.txt clark

Explanation / Answer

$file_name = $ARGV[1]; open (OUTPUT "> $file_name") or error("unable to create or open $file_name"); print OUTPUT "hello world"; close(OUTPUT); open HANDLE, $OutputFileName or die $!; open (HANDLE, ">$OutputFileName); open HANDLE, ">$OutputFileName" or die $!;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote