http://www.perlmonks.org?node_id=448839


in reply to Re: Four part JAPH
in thread Four part JAPH

Hi cog, does this mean 3 more parts are coming?

No, it means that the japh is calculated in four different parts :-) Try to deobfuscate it :-)

R`st anothma [map hackma,

At first glance, I'd say that I'm relying on some special variable that holds a different value in your system... :-\ To find out which... oh boy... :-\

I'm saying this because I refrained myself from using $^F precisely because it could change...

Hum... I'd say $= doesn't hold 60 in your system... am I right? :-\

Replies are listed 'Best First'.
Re^3: Four part JAPH
by ghenry (Vicar) on Apr 18, 2005 at 13:26 UTC

    Nope ;-)

    perl -e "print $="

    Gives 60, on a Win2k, ActiveState 5.8.6 install.

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!
      Well, the word "Perl" should come out right as long as $=/($*+$,)+$| equals 11 and $; equals 0.

      By the time the code gets there, $| is 1, $* is 2 and $, is 4, so $=/($*+$,)+$| = 60/(4+2)+1 which in turn equals 11. In your case, the result of that operation is probably returning 27 instead of 11 (if I did my calculations right).

      One of those four variables is not getting the proper value it should. Try this: in the code, right before $a="\104\101\124\101", add something like print"<$=|$*|$,|$||$;>\n";, and then we'll be able to see what's wrong :-)

      The correct output for that code should be <60|2|4|1|>.

        It seems that $; is different. In Linux it is \034. On windows is any weird character. As the perlvar manpage explains, $; values cannot be safe if you have binary keys. I think ActiveState might have changed its value to a unicode value they think is not much used.

        Update: Accordingly with some folks on #perl ActiveState use the same value. Just don't know why the print prints that weird character.

        Modified code is now:

        END{s{}{"@{[map{$%=$_;$_=&{$_{$_}};$%%2&&s%.%\u$&%;$_}($|..${$/=\ ($^A+$|+$?)})]},"}e;print}($,,$,,+$*,$,,$,)=($|..$=/(+++$^A+$^A)* +++$^A*++$^A);@_{++$|..2**(++$-+$-)}=(sub{(join$',map{+chr($|+$,+ ord($_))}reverse((split$`,&{$_{$=/($,*$,+$,)}})[$...$|]))."${\'s' }".substr(&{$_{2}},$^A,$|)},sub{"anoth".substr(&{$_{$^A}},+$-,$-+ $|)},sub{ print"<$=|$*|$,|$||$;>\n"; $a="\104\101\124\101";!seek$a,$=/($*+$,)+$|,$;or~~<$a>}, sub{local$";"@{[(split//,(chr($^A-$|+ord(substr(&{$_{$^A-$|}},+$? ..++$?)))).&{$_{$,/($^A-$|)}}.chr(2*$=-$^A*$,-$|))[$,+$|,$|,$--$| ,+-+$|,-$|x$?,+$=/(0+$,*+$*+-+-$*),$,+-+-~~$*+-+-$|]]}"});__END__

        Which gives:

        J:\>perl japh <60|2|4|1|&#8735;> <60|2|4|1|&#8735;> <60|2|4|1|&#8735;> <60|2|4|1|&#8735;> <60|2|4|1|&#8735;> <60|2|4|1|&#8735;> R`st anothma [map hackma,

        Walking the road to enlightenment... I found a penguin and a camel on the way.....
        Fancy a yourname@perl.me.uk? Just ask!!!