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.
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.