this post was submitted on 25 Nov 2025
328 points (99.4% liked)
Programmer Humor
27506 readers
1495 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
A bit of Perl code from the late 90s/early 2000s that worked something like this (working from memory, untested):
Let me explain a bit about what this does. Instead of reading a file line-by-line and using Perl's regex engine to match, it uses backticks to call out to the shell for
grep. Those are split up by line. Then go through those lines (in a C-styleforloop, not the perfectly goodforeachversion that Perl has had for a long time) and now we use a regex to match that line. You know, just in case shellgrepdidn't do its one job.If anything, I'm probably making this code look better by declaring variables with
myand followinguse strictstandards.This was written by a guy who was the main programmer before I was hired. I was told he was a real piece of shit. He often had some checks in his code that, if not passed, threw messages to the client like "WE HAVE DETECTED YOUR HACKING AND LOGGED YOUR IP ADDRESS WE'RE GOING TO GET YOU". Never met him personally, but his code is a pretty good example of why everyone came to hate Perl.