Lab3: Timing user input

Write a Perl program to test how fast the user can sort fifteen numbers. The numbers are to be sorted into either increasing or decreasing order. The user can select either option by typing "i" or "d" at the first prompt. In either case, the program will display the items on the screen (labeled a, b, c, d, ... n, o) after the user enters "i" or "d". The user must then type the labels of the fifteen items in sorted order, one to a line. If a label is typed out of order, or some other mistake is made, the program should print a brief error message and allow the user to try again. The program should record how long it takes to get each item correct in an array and print the times and the average time at the end.

Details: