![]() |
Exploiting the Information World
|
|
For each exercise that you complete during class you must make record your results to show the TA (or show the TA your screen). If you don't have time to complete everything during class you must record your results and give them to the TA by the next class meeting. |
Write a perl program that reads in a bunch of lines and prints them out in reverse order.
Write a program that reads a list of words (one per line) and prints out a sorted list of the words (one per line).
Write a program that reads in a sequence of lines of text from STDIN and prints them back out with line numbers. Given this sequence of lines:
This is the first line I'm number 2! Getting close to the end THE LAST LINEyour program should print out something like:
1. This is the first line 2. I'm number 2! 3. Getting close to the end 4. THE LAST LINE
Write a program that draws a square of size specified by the user. Here is a sample output for a square of size 5 (5 rows x 5 cols):
Enter the size of the square: 5 OK - here is your 5 x 5 square: ***** * * * * * * *****
Your program must work for any size square!