This isn't a direct answer to your question, but a general Perl suggestion - check out use strict. There are hundreds of nodes about it, and several of the Perl books devote chapters to this most wonderful Perl construct. It will save you more headaches than you think could exist, especially if you plan on doing a lot of CGI work.