3 ms·
I'll never understand how anyone ever liked Perl. I remember before PHP came out and Perl + CGI was what all the forums used, and that kind of made sense before
by 9d 1y ago
I'll never understand how anyone ever liked Perl. I remember before PHP came out and Perl + CGI was what all the forums used, and that kind of made sense before Node.js + TypeScript + Nginx were a thing (maybe). But for scripts? I mean, I guess that it makes sense as a sort of bash on steroids, but at that point, why not have something more structured? Then again, that's around the time that Lua, Ruby, Python etc were all being invented, and for that exact use-case, to be a better scripting language that bash or Perl. But... why even use Perl as an intermediate step? Why not just say "hmm, bash is too simple for this... I'll write a --" oh, I think I get it now. Your only option was Perl for a while, if you didn't want to write a full fledged C or C++ script, which would be much more verbose and unforgiving.
- xyzzy123 1y agoPerl's sweet spots were CGIs & sysadmin. The advantage for sysadmin was easier portability in the days when there were a ton of flavours of UNIX systems. The ergonomics & distribution of Perl in the 90s were unmatched, Ruby, Python, Lua were niche in comparison. The other killer feature was CPAN, the Perl community basically invented language package management and everyone else copied it.
- edoceo 1y agoCorrect and the Patterns are repeating. Cycles. These are all transitive things. Reminder to keep some old-heads around, for perspective.
- pjmlp 1y agoIt is a safer C, as Perl traditionally exposed the whole UNIX/POSIX API surface, and most tasks that grew out of a simple shell script didn't need to be written in straight C with all its issues managing strings and arrays. Eventually Python became a better alternative, however for me it was mostly because I had enough of sigils, the way reference works and the hacky way of doing objects with blessed references. And as the sibling comment points out CPAN. The previous generation of Nokia NetAct infrastructure software as originally written for HP-UX, was a mix of CORBA C++ and Perl, and by 2007, it was still the main implementation. Nowadays it has been rewriten into Java.
- tpm 1y agoPerl is a great language in the right hands. In a previous job the whole software system for a successful gambling company (sans the publicly available website, that was PHP and later Java) ran on Perl, central server and hundreds of branch servers (and clients), the branch software was able work autonomously if the connection to the central one was down. Everything was fast, stable and there was a total of 4 of us working on it (2 with PhDs). Right about when I was leaving it was decided there will be a transition to Java (won't go into the reasons for that) and the last programmer headcount I know of was more then 20.