Thanks everyone for all your help, It turns out that chromatic was right I had missed ; after use strict ( I feel very very stupid now) I will be looking at everyones suggestions to help improve my CGI and Perl skills.
Thank you all I am sure I will be back I am moving on to part 3 now.