Good point. Seems the OP is mixing Function-Oriented with Object-oriented use of
CGI.pm
Have a look at
http://stein.cshl.org/WWW/software/CGI/cgi_docs.html#functionvsoo, which gives a pretty good run down of the difference. Mostly, you're using the $q object, which is great. It just means that you don't need to bother importing the standard functions into your namespace with
use CGI qw/:standard/; . . .
my $q = new CGI; should be enough.
--twerq