Dissect if you will, parse it for thrills, enjoy or ignore, perhaps give it a score.
 
tachyon
################################################################ # # # A Thought on Perl Poetry and the Immortal JAPH # # # # I, require strict* and do not require warnings*. My answer # # equals reference you unless answer equals 42. Question: If # # defined, by this paradigm, do you do, the hacker foo? Now # # join the data (why Fs & Os?), so the space or newline goes # # Character evaluate: Reverse split null, then for each foo: # # You ate foo, but I ate two. Answer -> Join with null, sort # # the spots, and print it join the dots. Go now and exit, do # # not die, else go to question and answer why? JAPH! (c)JADF # # # ################################################################ I, require strict and do(not require warnings); my $answer = \$u unless $answer == '42'; Question: if(defined by this_paradigm do you_do_the_hacker_foo(??)){sub AUTOLOAD{$_=$now=join'the',<DATA> ;y?FO?01?; s.o|the| |\n..goe;s/(.{7})/(chr(eval'($u,$ate)=(0,1); foreach $foo(reverse split "",$1){$u+=$ate*$foo;$but_I=$ate*=2;} $$answer'))/eg;$_= join'',sort/(..)/g and print join'',/.(.)/go; $now and exit, do(not die)}}else{goto Question and $answer;y???} __DATA__ OOFFOOOOOFOO OFOO OOFFFOOOFFO FOOO FFOO OFFO FFFOOFOOOFOF OFFFFOOF OFFFOOFOOOOO OFOO FOFO FFFF FOOO FOOF OOFO FOOO OFOF OOOO FFOF OOOF OFOF OOFO FFFO OFFF OOOO OFFO OOOF FFFO OFFO FOFOOOFFOFFO FFFFFOOOFOFF OOFFFFOOOFFO FFOO OFOF FOOFFOFOFOFF FFFOOFFOOFO FFFFFOOOOFOF OOOF FFOO OOOF FFOO OFOO FFOO OFFF FOOO FF OFOO FOOO OOOF FOFO OOFO OFFO OOFFOFOO FFFO FOOO FOFO OOFO FFOO OOFO FFOOOF OOOO OFFO FOOO OOFF OFOF FFFO

Replies are listed 'Best First'.
Re: A Thought on Perl Poetry and the Immortal JAPH
by cforde (Monk) on Jul 07, 2001 at 02:17 UTC
    # 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