From Esolang
Jump to navigation Jump to search

This article deals with Perl as it relates to esoteric programming. For more general information, see the Wikipedia article on Perl.

We'll write more about Perl after we decipher the following code:

perl -wlne'END{print$n}eof&&$n++;/<title>([^<]+)/i&&$n--' *


The code in question (from the collection "The road to Perligata") is a lament over the coming apocalypse, an expression of the author's Weltschmerz and the futility of all human endeavors. Let us take it step by step:

-wlne' The world is near its end.
END{print$n} At the end the sum of all our sins and virtues will be reckoned and the judgement revealed.
eof&&$n++; As the evil of mankind ends, perhaps the end itself is a positive thing.
/<title>([^<]+)/ We are preoccupied with fame and titles
i And insensitive to the suffering of others.
&&$n-- All this is for nought, and only hastens our demise.
' * For in the end, we are but stardust.


In Perl

eval join '', <>;

In shell scripts