In the late 1980s, Portland Oregon's third most famous resident
(after Monica Lewinsky and Tonya Harding) was not poring over
crusty clothing stains or thumping knees with an iron bar.
He was far too busy signing his many usenet posts with:

Just another C hacker,
Just another Unix hacker,

and so on.
Perl was new then.
And our intrepid usenet hacker loved Perl so much that he
insisted on answering requests for Unix shell/sed/awk help
with snippets of Perl code.
So much so that many posters resorted to inserting "No Perl please"
in their posts! Of course, making such a request on usenet is futile
and
the barrage of Perl snippet responses
continued unabated.
Indeed, so much did our maverick enjoy this little game, that he formed part of
the 2.7% who voted against
the formation of a separate comp.lang.perl newsgroup in 1989.

Having got used to signing "Just another ____ hacker,"
it just seemed normal and natural to continue the tradition by
signing his Perl missives with:

Just another Perl hacker,

Little did he realize that he was adding a new word
to the computing lexicon: the
JAPH.

Ironically, in later years, he expressed
some regret
about his creation because JAPHs seemed at least partly responsible
for an over-emphasis on Perl obfuscation and trickiness --
which did not portray Perl as he would have liked
(see •Re: Obfuscation has no place in production code).

This, the second installment in the Perl Culture series,
focuses on merlyn's little gift to Perl culture: the JAPH.

What is a JAPH?

A JAPH is simply a program that prints "Just another Perl hacker,"
to stdout. The basic idea is to use this (arbitrary) program
specification to highlight interesting language features in
the spirit of
TMTOWTDI.
In deference to its usenet signature origins, JAPHs are usually
limited to at most 4 lines, with each line at most
80 characters in length. To delight (and not bore) the reader,
a JAPH is expected to employ obscure or surprising or amusing syntax.

Reading this historic poem aloud, with STDOUT pronounced standard out and $ pronounced dollar, indicates that it's a haiku, containing the trademark 5-7-5 syllables in its three lines. Notice that this Perl 3 code no longer runs with modern perls.

If you know of any other JAPHs penned by Larry, please let us know.

Some Classic JAPHs

Choosing a favourite JAPH depends on personal preference:
some folks like JAPHs that break B::Deparse and are almost
impossible to decipher; others prefer ones that simply make them laugh.
Of the JAPHs I've seen,
the one that made me laugh the most is this one:

Lacking an ANSI JAPH standard, the past decade has seen a
gripping power struggle for control of the de facto JAPH standard
between their inventor, merlyn, and perhaps their greatest
promoter,
the inimitable Abigail.

On one
occasion,
upstart Abi claimed the right to change the JAPH standard:

Being the one who has given several talks about Japhs, I've decreed
that a Japh uses the following rules:
- It prints "Just another Perl Hacker" with some reasonable
capitalization, followed by optional punctuation (comma,
dot) followed by an optional newline. Some flexibility
in rules makes for more Japhs. Printing to either STDOUT
or STDERR is allowed.
- It doesn't print anything else.
- The program uses at most 4 lines, each line at most 80 characters.
- It uses obscure or surprising syntax.

As argued by BooK in Separated JAPH/Obfuscation sections, there are significant differences
in emphasis between JAPHs and obfus. I don't want to enter this debate
right now, but might in the next installment, which will focus on obfus.