# ignoring the leading comments # a bareword and a couple of requires I, require strict and do(not require warnings); # define $answer as a reference to $u my $answer = \$u unless $answer == '42'; # a label, just for fun Question: # the routine "you_do_the_hacker_foo" is not defined so... if (defined by this_paradigm do you_do_the_hacker_foo(??)) { # ...this subroutine is called sub AUTOLOAD { # $_ and $now contain the lines after "__DATA__", each line separated +by "the" $_ = $now = join 'the', <DATA>; # translate the Fs to 0s and Os to 1s y ?FO?01?; # remove all occurances of o, the, spaces and newlines # $_ contains only 0s and 1s, hmmm, a bit string s.o|the| |\n..goe; # take 7 characters at a time, hmmm, a byte with high order 0 # use eval to translate it to decimal ($u) and replace the 7 "bits" # with the corresponding ASCII character # $$answer is misleading, it's really just another name for $u # this becomes the result of the eval which is passed to chr s/(.{7})/(chr(eval' # for each set of 7 characters assign $u=0 and $ate = 1 ($u,$ate) = (0,1); # reverse the order of the 7 characters and take them 1 at a time # compute the decimal equivilent (base 2 to base 10) foreach $foo(reverse split "",$1) { $u += $ate*$foo; $but_I = $ate *= 2; } # set the return value from the eval, this is really $u $$answer' ))/eg; # break $_ into pairs of characters and sort them # print the second character in each pair # pretty clever $_ = join '', sort/(..)/g and print join '', /.(.)/go; # $now is true, call exit to avoid reporting errors in the above if st +atement $now and exit, do(not die) } # some tin foil for the radar... } else { goto Question and $answer; y??? }

Have fun,
Carl Forde


In reply to Re: A Thought on Perl Poetry and the Immortal JAPH by cforde
in thread A Thought on Perl Poetry and the Immortal JAPH by tachyon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.