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)?

Replies are listed 'Best First'.
Re: JAPH with constraints
by Anonymous Monk on Jan 05, 2003 at 08:34 UTC

    Does following satisfy all conditions? (71?)

    die\*$!~/./.($_=$&,$_++,$_++,++$_).$&x[]=~/./.$&x$^=~/.$/.$&x{}=~/./.$/

      Uhm, sorry. It was me :) (49)

      die$;!~y//.-~/c.$;.([$^=~/./g]&~$").$&.($;&{}).$/

      69 for truly EBCDIC:

      []=~/./;$;=$_=$&;$;++for$^F..ord$/;die$;.$_.$&x$^=~/.$/.{}!~/./.$&.$/
        The first one is very nice! However, the second one contains the variable $^F, which is not allowed by the constraints.
      This one is "use strict" and -w flag compliant. Great ! ++