1) Write me a perl program that counts from 1 ... 10.  It must start at 1 and end at 10.










2) The file '/tmp/foo' consists of lines of text, each with a ':'.  Write me a perl program that opens a file '/tmp/foo', and prints every line.  The text should be reversed, as shown below
 
a:b b:a
abcd:efgh efgh:abcd
xxxyyy:z z:xxxyyy
1:2:3 3:1:2

 
 
 
 
 
 

3) Assume there is an array named 'a'.  This array contains numbers.  Write me a program fragment that prints the average of the array.









4) Write me a SUBROUTINE named foo.  This subroutine takes one argument, and prints either a 'yes' or 'no' depending on wether the file named buy the argument exists.