in reply to Re: Dynamic menu generation
in thread Dynamic menu generation

Okay, I am mystified (and if need be, humbled). I have seen this sort of genuinely obfuscated thing before (in someone's .sig file perhaps?) and even confirmed that it worked.

What I am wondering though, is how the heck do you come up with code like,

$_=q~;ir$w}Uw&Ii,jmcumUumbo#e_cjm>oImb}U|nyp@''@#l"ynrjmUtthU]h!U[$rhb +]h!U[11mU=mboI|_|mU#|wU"mcuL)'(*=L#/l"ynrjmU)mboI|wU"mUuhb]mU[#|wU"mc +uL)(*=)*<=hU]-s[)'*<=L#//f_y${sumc#/#tir$w~;y~L)oep<;@y>m}/Ushw![i=nb +$1*l#_&|{"]u('f,tjIcr~"<)ftI*'i_@=}s1$u#]m>lcn|Lw;obp!h[,U/jy&({re~;s +,.*,$&,ee;$_

I mean, I can't even recognize many operators in that mess, let alone interpret jmcumUumbo#e_cjm into anything meaningful. Also, I could not get this to work.

Clues for the clueless? Or perhaps I am missing some larger joke.



PCS

Replies are listed 'Best First'.
Re: Re: Re: Dynamic menu generation
by rdfield (Priest) on Oct 31, 2002 at 09:49 UTC
    The 'mess' should not be interpreted literally.

    Hint 1: read perlop wrt to quoting operators.

    rdfield

Re: Re: Re: Dynamic menu generation
by Thelonius (Priest) on Oct 31, 2002 at 15:31 UTC
    The first two statement in sub menu are:
    $_ = q~ stuff ~; y~ characters ~ other characters ~;
    If you insert a "print;" here you will be a lot less mystified.
Re^3: Dynamic menu generation
by tadman (Prior) on Oct 31, 2002 at 19:07 UTC
    It works, but you'll have to be careful about how you copy it. Perl Monks inserts red plus signs (+) to break up the lines, that if pasted in to the program will cause it to fail. You can edit these out if you're careful, and join the program back in to one line, or use the "D/L Code" link to get a clean copy.

    Now, this is intentionally obfuscated, but the non-obfuscated source isn't that much clearer. Here's the encoded program that is being run:
    *menu=sub{my(@r,@s,@c);for(@_){@c=split'//';while(@s&&$s[$#s]ne$c[$#s]||@s>@c){pop@s;push@r,"</UL>";}while(@s<@c){push@s,$c[@s];push@r,"<UL><LI>$s[-1]</LI>";}}join!1,@r;};&menu