Most of the second and third lines are devoted to initializing $a (and $| as a side effect):
The two unpacks generate an array consisting of the number 14417713111218131332253147132969324349431334211136532212511512172112293224231453242. The decimal digits of this number are then extracted via =~/./g and used to run-length decode a bit string 1000011110... via map--$|x$_. Since the number of decimal digits is odd, the last value of $| is 1. After we remove the initialization code and the trailing #JAPH, comment we have: The expression substr(($a)x2,$_,256) produces a copy of the bitstring rotated left by $_ characters (assuming 0<=$_<256). The map sets $_ to 7 and 249 producing the bitstring rotated left by 7 characters and rotated right by 7 characters respectively. These bitstrings are passed to sub{pop^pop} which XORs them together. They are then further XORed with the original bitstring. The unpack separates the bitstring into groups of 8 bits, and the pack converts the first 25 groups into characters. The substitution converts everything but letters and commas into spaces. The next statement sets the output line ending to a CR unless the first letter of $_ is a J in which case it sets it to the input line ending. The final redo starts over at the beginning of the block. The rotate-and-XOR operation used in this program has period 128, so every 128 iterations the JAPH string is printed. The initial bitstring becomes the JAPH string after 67 iterations. I note with interest that the bytes after the end of the JAPH string are not all binary zeros. |
In reply to Re: My 1st post (japh)
by jdalbec
in thread My 1st post (japh)
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |