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

Re: 59 /e

by iamcal (Friar)
on Jun 18, 2001 at 11:01 UTC ( #89239=note: print w/ replies, xml ) Need Help??


in reply to 59 /e

I like this JAPH alot.

# # use strict or die # use strict; # # this is the command we use to start working on @_ in the s///e # my$s=';pop'; # # set $_ to be empty to start with # $_=''; # # a comment # # 59 /e, 2001 Philippe "BooK" Bruhat # # ??? # *_=*ARGV; # # set up @_ to contain our list of japh commands # @_=qw(4a4a2bfe01ac410d0105f4fd0dae30150dfab448f90208fa0d98 pop print+c +hr(shift) print+chr(shift) unshift@_,(shift()+shift())x2 push@_,(pop, +pop)x24 print+join"\n",@_; unshift@_,(map{unpack'c',$_}split//)[0..25 +] ; s/../chr(hex$&)/eg $_=substr(shift,0,52) @_=map{s|$|$s|s;$_}@_;po +p); # # start the chain of evals # s//$s/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee;
A breakdown of what the eval does (a JAPH in itself):

# # first we do the pop as stored in $s # pop(@_); # # the pop'ed command adds ";pop" to the end of each element of @_, the +n pops the next command off the @_ array # @_=map{s|$|$s|s;$_}@_; pop(@_); # # set $_ to "4a4a2bfe01ac410d0105f4fd0dae30150dfab448f90208fa0d98" and + pop # $_=substr(shift(@_),0,52); pop(@_); # # Transform each pair of hex digits into a character and pop # s/../chr(hex$&)/eg; pop(@_); # # pop # ;;pop(@_); # # unpack each of the first 25 characters in $_ and unshift them on to +the beginning of $_ and pop # unshift@_,(map{unpack'c',$_}split//)[0..25]; pop(@_); # # pop # ;;pop(@_); # # take the last 2 elements from $_ and put them back on the beginning +again. do this 24 times (so there should be 26 pairs of these command +s in all). then pop # push(@_,(pop(@_),pop(@_))x24); pop(@_); # # do these commands 26 times: # take two chars from @_, add them, put them back on @_ and then remov +e and print them # unshift(@_,((shift(@_)+shift(@_))x2)); pop(@_); print(chr(shift(@_))); pop(@_); # # finally print the last character # print chr(shift(@_)); pop(@_); # # and do some more pop'ing # pop(@_); pop(@_);


Comment on Re: 59 /e
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (13)
As of 2015-07-02 11:02 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 (34 votes), past polls