JAPH
   HOME

TheInfoList



OR:

Just another Perl hacker, or JAPH, typically refers to a
Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offici ...
program that prints "Just another Perl hacker," (the comma is canonical but is occasionally omitted). Short JAPH programs are often used as
signatures A signature (; from la, signare, "to sign") is a Handwriting, handwritten (and often Stylization, stylized) depiction of someone's name, nickname, or even a simple "X" or other mark that a person writes on documents as a proof of identity and ...
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 general ...
designs. The phrase or acronym is also occasionally used (without
code In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communication ...
) 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 Randal L. Schwartz (born November 22, 1961), also known as merlyn, is an American author, system administrator and programming consultant. He has written several books on the Perl programming language, and plays a promotional role within the Per ...
, 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 distinct ...
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 (computer programming), literal or anonymous string is a String (computer science), string value in the source code of a computer program. Modern Computer programming, programming languages commonly use a quoted sequence of charact ...
: $_="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 (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. An ...
): 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. An ...
, 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 ch ...
characters. This breaks after Perl 5.30.0, as using $# and $* create fatal errors. This JAPH was written b
Eric Roode
and 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, and ot ...
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
EyeDrops
module: ''=~('(?`]()`@.@]@% ASCII_art">}%[@`@!#@%[').',"})') ASCII_art_(to_make_this_dromedary.html" ;"title="ASCII_art.html" ;"title="}%[@`@!#@%[').',"})') 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 .'wQ}*JWeOe/U*OJd[OI@*BJ*JXn*J>w}CWq*OJc8KJ?O[e.html" ;"title="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">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 illustra ...
*
Obfuscated Perl Contest The Obfuscated Perl Contest was a competition for programmers of Perl which was held annually between 1996 and 2000. Entrants to the competition aimed to write "devious, inhuman, disgusting, amusing, amazing, and bizarre Perl code". It was run by ...
* Perl golf


References


Further reading

*


External links


Cultured Perl: The Elegance of JAPH

Cpan.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