I don't mean to critisize your code, especially when you haven't asked for this type of comment, but CGI.pm
will handle all the parameters for you, so you don't need all the stuff on line five to fourteen. You could even change them to $log=param('username');$pass=param('password');
It will also generate all the HTML for you. Ovid has an excellent tutorial linked to on his home node that has helped me with CGI a great deal, and talks about why you shouldn't try get the parameters the way you have. He also wrote use CGI or Die;.
Actually, merlyn beat me to it.
the blue haired monk