Skip to main content

Posts

Showing posts with the label Perl

Perl Lab 5

Perl Lab 5 1. Create an array of string that holds the following information: your first name your last name your student Id your nationality your favorite Food your favorite singer The print the contents on the screen. A Sample output is shown below: FirstName: John LastName: Smith StudentID: 4777777 Nationality: Canadian Favourite Food: Poutine Singer: Drake 2. Write another program that creates the above output using a hash that stores the following key value pair (20 marks): FirstName - your first name  LastName -  your last name ID -  your student ID Nationality - your nationality Favourite Food - your favourite Food Favourite Singer: your Favourite Singer Process it with a foreach loop that prints the key/value pairs as shown above.  3. Write another program that stores two numbers as integers and prints the following (20 marks): First Number - 4 Second Number - 2 Sum is 6 Diffe...

Intro Perl Lab 1

Exercise 1 Create a perl program that stores your StudentID, First Name, Last Name, program Name, Course ID and CourseName in 6 variables and then creates the following output: Student ID: 99999999 Name: First_name Last_Name Program: Program Name course ID: Course ID Course Name: Course Name Exercise 2 Create an array that stores the days of the week and then print the days of the week to the console screen. Output should be as shown below Mon Tue Wed Thu Fri Sat Sun