in reply to CGI.pm question

You need to replace use CGI; with use CGI qw(:standard);. That will tell CGI.pm to export standard functions like param() and header().