tangieb01 has asked for the wisdom of the Perl Monks concerning the following question:
I strongly suggest that you use the CGI module for handling web forms.
As for your question, what exactly are you trying to do? I find this code vaguely confusing...