Choker - if your cgi-script current script is running under perl - I'd suggest getting it cleaned up and running under mod_perl also ditch the text files and use mysql. (with enough RAM the database will stay in memory)
A colleague and I have recently converted a web application to mod_perl and the speed increases were about 2000-3000%. This was a monster application comprising of about 250,000 lines of code
Another suggestion is to use a load balanced set up.
For a high traffic intranet I recently used the following with startling results:
Local Director (does load balancing)
Database Server (Lots of Ram & Raid config)
3 x web servers (fairly standard PC's NOT servers)
You'd be suprised by the results on this setup - even though I was using PC's for the web servers
