#!/usr/bin/perl $_='print(chr(62+ -+1+ length))foreach(((m /(\S+)/g)))';eval;
Got the idea for this japh this morning while driving to the office.

Don't know whether this technique is known.
I think it's possible to make the code even smaller, but it will take some puzzling time...

cheers, Len

Replies are listed 'Best First'.
Re: spacy japh
by japh (Friar) on Mar 21, 2002 at 19:44 UTC
    Ah, a steganobfuscation, akin to my japh's japh II. In yours, J, A, P, and H are hidden in the number of non-whitespace characters tucked between the endpoints and the 3 spaces embedded in the code. You then add a constant and convert to ascii.

    Don't be too bummed .. I thought I was original too, but this method has literally been in use for centuries.

    As far as making the code smaller, I had to pad my code with filler because it was too efficient to house the amount of data I wanted to hide in it.

Re: spacy japh
by snafu (Chaplain) on Mar 25, 2002 at 03:45 UTC
    Ok. Now I am genuinely interested in how this bad boy works. I've tried breaking it down but this is way over my head. Hows this work?

    _ _ _ _ _ _ _ _ _ _
    - Jim
    Insert clever comment here...

      As japh already explained in this thread, the characters JAPH are determinated by the place of the spaces in the code. The code itself is put in $_ and than evalled. So the code actually parses it's own code. The length of the blocks of non-whitespace characters, added with 61 (62 +-1) forms the ascii worths for J A P H.
      #!/usr/bin/perl $_='print(chr(62+ -+1+ length))foreach(((m /(\S+)/g)))';eval; print(chr(62+ <-Length:13 Ascii:61+13=74 (J) -+1+ <-Length:4 Ascii:61+4=65 (A) length))foreach(((m <-Length:19 Ascii:61+19=80 (P) /(\S+)/g))) <-Length:11 Ascii:11+61=72 (H)
      Cheers, Len
        Yes. I read Japhy's comment...and that is the theory of how it works, true. I was wanting more of a breakdown (similar to what you did). And now, I have a few more questions regarding your breakdown.

        I am seeing syntax that is just not recognizable to me. This is what I would like learn.

        -+1+                <-Length:4  Ascii:61+4=65  (A)

        How does '52+ -+1+ length' work? Specifically the '-+'...what does that do?

        I finally just figured out that this is one of those 'do this for each iteration of expression'. So really, I am just wondering what the operators are doing up there.

        _ _ _ _ _ _ _ _ _ _
        - Jim
        Insert clever comment here...