Content deleted Content added
→Examples: debug |
DragonHawk (talk | contribs) major rework |
||
Line 1:
'''Just another Perl hacker''', or '''JAPH''', typically refers to a [[Perl]] program which prints "Just another Perl hacker," (the comma
JAPH programs are classically done using extremely [[obfuscated code|obfuscated]] methods, in the spirit of the [[The International Obfuscated C Code Contest|Obfuscated C Contest]]. More recently, as the phenomenon has become so well known, the phrase is sometimes used in ordinary examples (without obfuscation).
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.
==Examples==
JAPH program without obfuscation:
$_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;▼
Embedding JAPH in opaque code:
$_='987;s/^(d+)/$1-1/e;$1?eval:print"Just another Perl hacker,"';eval;
Decoding JAPH from an [[cryptography|encrypted]] [[string literal]]:
▲ $_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;
Appearing as if it does something completely unrelated to printing JAPH:
$_ = "wftedskaebjgdpjgidbsmnjgc";
tr/a-z/oh, turtleneck Phrase Jar!/; print;
not exp log srand xor s qq qx xor
Line 33 ⟶ 41:
exec return y s gt sin sort split
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
Line 40 ⟶ 48:
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
==Immitations==
A variant of this, practiced by programmers working on the [[Parrot virtual machine|Parrot]] project, involves Parrot assembly programs printing the phrase "Just another Parrot hacker":
Line 58 ⟶ 66:
Often Parrot JAPHs are only lightly obfuscated; they're usually intended to demonstrate or test a feature in a non-trivial use.
==Additional information==
===See also===
*[[Obfuscated Perl contest]]
===References===
{{FOLDOC}}
===External links===
*[http://www-106.ibm.com/developerworks/linux/library/l-japh.html Cultured Perl: The Elegance of JAPH]
|