If, contrary to the advice you have been given you insist on using CGI.pm, then I recommend that you buy the a copy of the ancient companion book "A Complete Guide to Programming with CGI.pm" (ISBN 0471247448). Your current question is answered in "Chapter Two: CGI.pm Basics"