Just another Perl hacker


Just another Perl hacker, or JAPH, typically refers to a Perl program that prints "Just another Perl hacker,". Short JAPH programs are often used as signatures in online forums, or as T-shirt designs. The phrase or acronym is also occasionally used for a signature.
JAPH programs are classically done using extremely obfuscated methods, in the spirit of the Obfuscated C Contest. More recently, as the phenomenon has become so well known, the phrase is sometimes used in ordinary examples.
The idea of using tiny Perl programs which print a signature as a signature was originated by Randal L. Schwartz, in his postings to the newsgroup 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/^/$1-1/e;$1?eval:print"Just another Perl hacker,"';eval;

Decoding JAPH from a transposed string literal:

$_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s///;

Printing out JAPH as separate processes:

for $i
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;sleep randif/\S/;print

Using only Perl keywords :

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, no alphanumeric characters. This breaks after Perl 5.30.0, as using $# and $* create fatal errors. This JAPH was written by and only works on Unix and Unix-like systems:

`$=`;$_=\%!;=//;$++$|;=...........,$=++;$.++;$.++;
$_++;$_++;=;$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%$.$~$*$$%$;$\$"$^$~$*.>&$=`

A much shorter one, using only punctuation, based on the module:

''=~`@.@]@%[` $V+=?-32:31
$D->->=1 $H=$_;$I=$N=j$H;$K=$O=j$H;whilea$y=$_;map;$T.="\n"