Just for fun, I decided to write a JAPH that satisfied the following constraints:
1) No strings*.
2) The digits 0-9 cannot appear in the code.
3) No reserved words/core functions over 3 characters long.
4) Letters can only appear in lower-case reserved words and core functions.
5) The letters J, A, P, and H cannot appear in the code in upper- or lower-case.
6) Each letter must be generated in a different way.
7) No variable can be used more than 4 times.
8) The final code must be less than 120 chars.
The result (wrapped to fit in 80-char lines)**:
\_=~/..(.)/;$^=$_=$+;y/+-~/:-~/;$^++for($$/$$<<$#+..ord$/);
vec($@=$^,$%,$#**$@+$#+)=$!;die$^.$+.$_.$@.$/
Now here's the challenge:
Prove or disprove that it is possible to write a JAPH (in Perl) that satisfies the constraints listed above and works on both ASCII and EBCDIC systems.
Have fun ;-).
*You are allowed to have regexes (qr//, m//, etc.), but qw, qq, q, s/// without the 'e' modifier, here documents, etc. are not allowed.
**Yes, I know that this can be further reduced (it's not even very obfuscated!). How short/further obfuscated can you make it (while still meeting the constraints)?