This makes me nostalgic. Spent inordinate amounts of time writing terrible, unmaintainable Perl scripts and FTPing them to cgi-bin on free 5MB hosting plans on F2S and Netfirms. Most hosts wouldn't provide error logs, so there was nothing more than a 500 page from httpd to tell you that something had gone wrong. Debugging anything was an endeavor. Then of course, PHP came along and killed cgi-bin.
If I had to pick one thing to represent the CGI era, it would be Matt's FormMail [1].
Lucky you. At a previous workplace I had to cater with actual binaries produced from C source code that contained strings that contained script tags that contained JS code that generated HTML. I’ll let you sink that in and process the escaping.
Apparently it never occurred to some people that they could read those from disk, even from the C program.
mod_perl had the issue that it had hooks deep into the webserver, which wasn't "shared hosting safe" mod_php had less hooks and some basic cross-vhost-access mitigations (Safe_mode oben_basedir etc.) which allowed independent users to put PHP scripts on the same server, which in turn made web hosting cheap.
When I last used PHP (about 5 years ago) it was common to use it via FastCGI "for performance". I'm not sure how true that reasoning was, or how the speedups of 7.x have changed things, but (Fast/S/whatever)CGI still seems prevalent.
Oh man I remember using the Netfirms free tier! The internet was so different back then, a company wasn't afraid of giving free compute resources on subdomains of their main site.
If I had to pick one thing to represent the CGI era, it would be Matt's FormMail [1].
[1] https://www.scriptarchive.com/formmail.html