in reply to Reaped: Help I need to hand this in on monday.

OK I am not going to answer this for you but since you have honestly said that it is homework I will try and shove you in the right direction.
First dont panic the solution is not hard...
printing to screen :
print "Message\n"
This will print a message to the screen, the \n is the newline char and is required to ensure that it is displayed as you would expect.
reading in ip you have lots of alternatives check out <>
$Variable = <>
will read a line from stdin and place it in the variable $Variable it will have the newline char at the end so use chomp to remove it (look it up). For extra credit you could use a regexp and die to validate the input, look it up. Stick those two bits of info together and you have the first bit of your program. To produce the result look at for loops look at the node for loops for info about these, in short they will loop over a block of code a specific *say 10* times. The for loop, combined with a print will allow you to display the results. Ooh I spose I should mention that you can print variables thus:
print "The value in variable = $Variable\n"
I hope this helps, but not too much. All in all about 1/2 a dozen lines of code. This is not the optimal solution but hay ho if you wanted optimal you should have listened in those lectures.
--

Zigster