in reply to Found in translation: JAPH

Well, (i) it's less than 80 chars, (ii) it's indeed obfuscated, (iii) it does print that string, although I think it's preferrable if possible to print \n as well, (iv) it's obviously strict safe.

Said this, IMO it's rather too naive and "transparent". However I suspect you can't do much better in such a small space.

Personally I'd use all lowecase letters and use some trick to turn it into the wanted string, a la:

s/\w+/$|--?$&:ucfirst$&/ge; # or s/\w+/$&^($|--?'':"\x20")/ge;

Replies are listed 'Best First'.
Re^2: Found in translation: JAPH
by radiantmatrix (Parson) on Dec 14, 2004 at 15:13 UTC

    Not obfu enough,eh? I played a bit and came up with this:

    s..s::KVTU!BOPUIFS!QFSM!IBDLFS,:;y|KQ!B-JL-PR-Z|JP a-ik-oq-z|;s||print +|e.e

    How's that?

    radiantmatrix
    require General::Disclaimer;
    s//2fde04abe76c036c9074586c1/; while(m/(.)/g){print substr(' ,JPacehklnorstu',hex($1),1)}

      s..s::KVTU!BOPUIFS!QFSM!IBDLFS,:;y|KQ!B-JL-PR-Z|JP a-ik-oq-z|;s||print +|e.e
      chip shot:
      s..s::KVTU!BOPUIFS!QFSM!IBDLFS,:;y|KQ!B-Z|JP a-z|;s||print|e.e
      ++obfu(ASCII-only):
      s..s::KVTU!BOPUIFS!QFSM!IBDLFS,:;y|KQ!>-[|JP ]-{|;s||print|e.e
      but this still leaves the problem of the off-by-one Caesar cipher embedded in the code. See if you can't come up with something less obvious.

        I hadn't even thought of it as a cipher until you mentioned it. Excellent point. I combined these ideas with the (bad) JAPH in my sig; let me know how this is:

        s,,2fde04abe76c036c9074586c1x,,y,26840adc7bf3x19e5,Jeka nsrhouP\n\,ltc +,,print

        radiantmatrix
        require General::Disclaimer;
        s//2fde04abe76c036c9074586c1/; while(m/(.)/g){print substr(' ,JPacehklnorstu',hex($1),1)}