Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Four part JAPH

by cog (Parson)
on Apr 18, 2005 at 13:18 UTC ( #448839=note: print w/ replies, xml ) Need Help??


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? :-\


Comment on Re^2: Four part JAPH
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!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://448839]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2015-07-29 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls