I've never programmed a CGI-BIN in Perl before but I must say... that code is _elegant_.
Perl and early HTML were a match made in heaven. But notice how HTML and the Web has become so complicated it still looks the same platform, but it ain't. My theory is that Perl died a slow death because the Web grew on a different axis than Perl's ideal niche, which is text manipulation.
What really "killed"[0] Perl were two main things:
1) PHP: Perl is great for general text processing, but it has warts that really bother people who aren't used to the language. PHP is slightly better for working with HTML (because it is designed for the purpose). While I think PHP's warts are worse, they tend to more bother people who are used to the language. This dynamic will tend to cause PHP to take new users that would otherwise go to Perl.
2) It's hard to overstate how profoundly alien the mid-90's/early-2000's were in terms of web software. In particular, proprietary tools were everywhere, and were just believed to be better for some reason. ColdFusion, ASP, and JSP all saw a ton of use (remember, the JVM was only beer-free at the time). The free software tools were comparatively scarce. There were zero notable free software web browsers until 1998 when Netscape was open-sourced. Even Windows ran on most of the servers. LAMP wasn't even coined until 1998[1]. Perl just wasn't established enough before Ruby on Rails and AJAX took over.
That second point is closely related to what you said, though.
JSP wasn't proprietary even if it was not yet open source. The writing was on the wall that Java would eventually be open source. Further the Java community process (the JCP) was an open to all. I literally voted a few times. Very different from coldfusion and asp.
I’m not sure my first reaction to the use of process ids as query params for session identification would be ‘my, that is an an elegant solution’.
I’m curious what aspect of the stacks of print calls outputting strings of escaped HTML with inline variable substitutions strikes you as an ‘elegant’ match between Perl and HTML?
Perl and early HTML were a match made in heaven. But notice how HTML and the Web has become so complicated it still looks the same platform, but it ain't. My theory is that Perl died a slow death because the Web grew on a different axis than Perl's ideal niche, which is text manipulation.
At the time, HTML was just marked up text.