Question: Please upload a single PERL .pl file on eLearning: 1. Write code to do the following using: a. Set the value of variable x to

Please upload a single PERL .pl file on eLearning:

1. Write code to do the following using: a. Set the value of variable x to 100. b. Print the value of 2x + 5.

2. Write a script that generates two random numbers between -10 and 10 and if the numbers match then prints Match Found else prints Different Numbers. You can use $RANDOM to generate the random numbers.

3. Write a script to declare two scalar variables x and y, initialize them to some values, and compute sum of their squares.

4. Write a script to declare two list(array) variables x and y of length 3 each, initialize them to using numbers, compute a list that is the sum of these lists, and print the middle three elements of the resulting list.

5. Write a script to declare a hash variable x which contains 3 values and 3 keys, initialize values to names and keys to numbers.

6. Write a script using ifelsifelse to compare three words entered by the user and compare if any two match.

7. Write a script using the while loop construct that generates 100 randomly generated numbers between 0 and 99 and writes them out in a user specified filename.

8. Write a subroutine to generate two random numbers between -10 and 10 and compute sum of their squares.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!