in reply to Help required to improve code

One feature of CGI.pm is that you can use the :cgi-lib function set to retain compatibility with cgi-lib.pl.

I don't know whether using this will speed up anything, but it may make the job of upgrading to more modern CGI methods a little easier.

I also evolved from Perl 4 to Perl 5, and from older ways of doing things to newer ways. Rewriting a lot of scripts is never fun, but once a workable template is in place, new scripts are a whole lot easier.