Just another Perl hacker, or JAPH, typically refers to a
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
program that prints "Just another Perl hacker," (the comma is canonical but is occasionally omitted). Short JAPH programs are often used as
signatures in online
forums, or as
T-shirt
A T-shirt (also spelled tee shirt), or tee, is a style of fabric shirt named after the T shape of its body and sleeves. Traditionally, it has short sleeves and a round neckline, known as a '' crew neck'', which lacks a collar. T-shirts are genera ...
designs. The phrase or acronym is also occasionally used (without
code) for a signature.
JAPH programs are classically done using extremely
obfuscated
Obfuscation is the obscuring of the intended meaning of communication by making the message difficult to understand, usually with confusing and ambiguous language. The obfuscation might be either unintentional or intentional (although intent u ...
methods, in the spirit of the
Obfuscated C Contest. More recently, as the phenomenon has become well-known, the phrase is sometimes used in ordinary examples (without obfuscation).
The idea of using tiny Perl programs that print a signature ''as a signature'' was originated by
Randal L. Schwartz, in his postings to the
newsgroup
A Usenet newsgroup is a repository usually within the Usenet system, for messages posted from users in different locations using the Internet. They are discussion groups and are not devoted to publishing news. Newsgroups are technically distin ...
comp.lang.perl. He wrote many of the JAPHs which are shown below.
Examples
JAPH program without obfuscation:
print "Just another Perl hacker,";
Embedding JAPH in opaque code:
$_='987;s/^(\d+)/$1-1/e;$1?eval:print"Just another Perl hacker,"';eval;
Decoding JAPH from a transposed
string literal
A string literal or anonymous string is a string value in the source code of a computer program. Modern programming languages commonly use a quoted sequence of characters, formally " bracketed delimiters", as in x = "foo", where "foo" is a string ...
:
$_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;
Printing out JAPH as separate processes:
for $i (0..4)
kill INT => $$;
Appearing as if it does something completely unrelated to printing JAPH:
$_ = "wftedskaebjgdpjgidbsmnjgc";
tr/a-z/oh, turtleneck Phrase Jar!/; print;
Forking processes to print out one letter each in the correct order:
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub pp;p;p;p;p;map%p;wait until$?;map%p;$_=$d qsleep rand(2)if/\S/;print
Using only Perl
keywords
Keyword may refer to:
Computing
* Keyword (Internet search), a word or phrase typically used by bloggers or online content creator to rank a web page on a particular topic
* Index term, a term used as a keyword to documents in an information syste ...
(no
punctuation
Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud. A ...
):
not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split
Using only
punctuation
Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud. A ...
, no
alphanumeric
Alphanumericals or alphanumeric characters are a combination of alphabetical and numerical characters. More specifically, they are the collection of Latin letters and Arabic digits. An alphanumeric code is an identifier made of alphanumeric ...
characters. This breaks after Perl 5.30.0, as using $# and $* create fatal errors. This JAPH was written b
Eric Roodeand only works on
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
systems:
`$=`;$_=\%!;($_)=/(.)/;$++$, ;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$% ?_$\$,$:$% ?,$"&$~,$#,);$,++
;$,++;$^, =$";`$_$\$,$/$:$;$~$*$% ?.$~$*$$% ?;$\$"$^$~$*.>&$=`
A much shorter one, using only punctuation, based on th
EyeDropsmodule:
''=~('(?`]()`@.@]@%
ASCII art">}%[@`@!#@%[').',"})')
ASCII art (to make this dromedary">ASCII_art.html" ;"title="}%[@`@!#@%[').',"})')
ASCII art">}%[@`@!#@%[').',"})')
ASCII art (to make this dromedary-shaped code work, the console size needs to be set to at least 119×48):
[Originally posted a]
perlmonks.org
by user liverpole.
#
sub j(\$) sub asub p$w= eval;$b=$w?'1;7;':"";($j,$u,$s,$t,$a,$n,$o
,$h,$c,$k,$p,$e,$r,$l,$C)=split/}/,'Tw*JSK8IAg*PJ[*J@wR}*JR]*QJ[*J'.
'BA*JQK8I*JC}KUz]BAIJT]*QJ[R?-R[e]\RI'.'}Tn*JQ]wRAI*JDnR8QAU}wT8KT'.
']n*JEI*EJR*QJ]*JR*DJ@IQ[}*JSe*JD JPe*'.'JBI/KI}T8@?PcdnfgVCBRcP'.
'?ABKV}*JWe*JD JPe*JC?8B*JE};Vq*OJQ/IP w">.'wQ}*JWeOe/U*OJd[OI@*BJ*JXn*J>w}CWq*OJc8KJ?O[e">I@*BJ*JXn*J>w.html" ;"title=".'wQ}*JWeOe/U*OJd[OI@*BJ*JXn*J>w">.'wQ}*JWeOe/U*OJd[OI@*BJ*JXn*J>w}CWq*OJc8KJ?O[e/T*QJP?}*JSe*JCnTe'.
'QIAKJR}*JV]wRAI*J?}T]*RJcJI[\]3;U]Uq*PM[wV]W]WCT*DM*SJ'. 'ZP[Z'.
'PZa[\]UKVgogK9K*QJ[\]n[RI@*EH@IddR[Q[]T]T]T3o[dk*JE'. '[Z\U'.
'7D$j" ."}AG". "$u}OG"
."$s}WG" ."$t","" ."24}(" ."IJ$a"
."}1G$n" ."}CO$o" ."}GG$t" ."}QC"
."$h}" ."^G$e" ."})IG" ."$r",
"32}?" ."H$p}FG$e}QG$r". "}ZC"
."$l", "28}(LC" ."" ."".
"$h}:" ."J$a}EG". "$c"
."}M" ."C$k}ZG". "$e"
."}" ."dG$r","18" ."}("
."D;" ."$C" )}###
#written 060204 by
#liverpole @@@@@@@
#@@@@@@@@@@@
See also
*
"Hello, World!" program
A "Hello, World!" program is generally a computer program that ignores any input and outputs or displays a message similar to "Hello, World!". A small piece of code in most general-purpose programming languages, this program is used to illustr ...
*
Obfuscated Perl Contest
*
Perl golf
References
Further reading
*
External links
Cultured Perl: The Elegance of JAPHCpan.org a collection of JAPHs at
CPAN
The Comprehensive Perl Archive Network (CPAN) is a repository of over 250,000 software modules and accompanying documentation for 39,000 distributions, written in the Perl programming language by over 12,000 contributors. ''CPAN'' can denote eith ...
.
How does this famous JAPh work?an
Fun With Reserved Keywords at Stack Overflow explain how blokhead's code works.
{{Perl
Perl
English phrases
Obfuscation
Test items in computer languages
Computer programming folklore