Programming

93% of Paint Splatters Are Valid Perl Programs

TETechPulse Team1 views
93% of Paint Splatters Are Valid Perl Programs

TL;DR: The 2019 claim that most paint splatters count as "valid Perl programs" is a joke built on a real quirk: Perl's grammar is loose enough to read almost any mess of symbols as code. It matters because code that parses is not the same as code that works.

Spill coffee on a printout of a Python script and you have a stained page. Spill it on a Perl script and, according to the joke that keeps bouncing around Hacker News, you may have added a feature. The idea is simple: Perl is so punctuation-friendly that a random spray of dots, slashes and dollar signs can often be read as real instructions.

What's actually going on

Perl is a programming language from 1987, still quietly running a lot of older websites and server scripts. It was built for chopping up text, and it leans on dense symbols: dollar signs for single values, =~ for pattern matching, squiggles and slashes everywhere.

Its grammar also forgives a lot. Bare words, stray operators and odd symbol combinations can each mean something. So a splatter of ink β€” or a cat walking on a keyboard β€” has a decent chance of being read as a pattern match, an empty loop, or a variable with an odd name.

The 93% figure, though, is not a survey. Nobody published a strict method, so treat it as a bar joke with a pointed edge. The point: Perl will accept things a human would call nonsense.

Why this matters even if you never write code

First, "valid" and "correct" are different things. A syntax checker only asks "can I read this?" It never asks "does this do anything useful?" A splatter of slashes might be accepted, yet do nothing at all.

Second, reading code takes most of a developer's day. Hours go into fixing a script that looks like static. After that, you have to fix it again, because the person who wrote it didn't leave a note.

And this hits your money. Slow fixes cost more, and hiring gets harder when a codebase is written as a puzzle. New staff take longer to get useful, and every typo takes longer to spot.

The bigger picture: readable code won

Perl's old motto was "there's more than one way to do it." Python pushed the opposite idea: one obvious way, easy to read. For new projects, the readable camp won.

That shift came from pain, not taste. Software gets handed between people and rewritten years later. A language's tolerance for mess becomes a tax on whoever maintains it next.

So don't read the paint-splatter joke as "Perl is bad." Plenty of billing systems and log crunchers still run on Perl every day. Read it as a reminder that clever and clear are not the same.

What to watch next

The punchline is getting automated. Code assistants now generate thousands of lines a day, and some review tools rank code by whether it runs. If a program passes, it can slip through review while still being junk.

You can borrow the same filter. When someone shows you a clever one-liner, ask what it does, not whether it compiles.

Key Takeaways

  • The 93% claim is a joke, but the underlying quirk is real: Perl accepts messy symbol soup.
  • Valid code only means the computer can read it, not that it does anything useful.
  • Unreadable code costs real time and money when bugs appear or staff change.
  • Modern languages and style guides trade clever tricks for clearer, longer names.

Frequently Asked Questions

Is Perl still used today?

Yes. It's less popular for new projects, but plenty of older systems, log tools and server scripts still run on it.

Why does Perl look like gibberish?

It packs a lot of meaning into symbols like $, @ and =~. That saves typing and makes short scripts possible, but it also makes code hard to skim.

Does a valid program always work?

No. Validity means the code can be parsed. Whether it does the right thing is a separate question, and that's where testing comes in.

How did this story feel?

Be the first to react

Recommended gear

Popular tech picks

Affiliate links: we may earn a commission at no extra cost to you.

Weekly tech brief

The tech stories worth your time, every Sunday.

One short email with the most useful guides and gadget picks from the week. No spam, unsubscribe anytime.

Written by

TechPulse Team

The TechPulse editorial team publishes clear, practical technology guides. Every article is original and written to be understood β€” not just skimmed. Read our editorial policy.

Comments (0)

?

Be kind. No account needed.

No comments yet β€” start the conversation!

Keep reading

93% of Paint Splatters Are Valid Perl Programs | TechPulse