pearl programming

1. gt.pl

Write a perl program that contains a subroutine that returns the greater of two numbers passed to it. The program should print out the two numbers that will be passed to the subroutine and then call the subroutine, passing those 2 numbers to it. The subroutine should determine if one number is greater than the other and return to the main routine the larger number so that the main routine can print out a message about which number is greater. In other words, if num1 was greater than num2, then the subroutine should return num1 to the main program and a message about num1 being greater would be printed out to the user. Otherwise, num2 should be returned and a similar message about num2 should be printed.

2. Double_the_number.pl Write a perl program that reads in a text file containing several numbers in it. The program should loop through all the numbers, printing out the original number and then multiplying it by 2 and printing out that doubled number.

3. pre_to_post.pl Write a perl program that checks an array of words, some of which contain a “pre” prefix and change those “pre” prefixes to “post” prefixes. The program should write the words out to a file called post_words.txt as well.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.