A few things. Firstly cgi-lib is old, very old. Please do not use this, it has some nasty security flaws and IIRC isn't 100% compliant with the CGI specification. Use the CGI module, it will be well worth the short time taken to replace cgi-lib. Secondly, your code is missing:
See Use strict and warnings.
On to your question. For your example above, does your script receive the input correctly? If I where you, I'd do the following:
After this is you have further problems please let us know.
Hope this helps.