in reply to Why is $$var bad?

Symbolic references (what you're talking about) are indeed a very bad idea.

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.