in reply to Why is $$var bad?
A better way to do it is just to use a hash.
Also, you should investigate using CGI.pm instead of cgi-lib.pl. It's better and it's well-supported.