Your code looks like this:
#!/usr/bin/perl -wl use strict; my $str_a = " 0000 0000 000000 000000 000000 000000 0000 0000 0000000000 000000 000000000000 00000000 00 000000 00 00 00 00 00 000000 00 00 0000 00 00 000000 00 00 000000 00 00 000000 00 00 00000000 00 000000 0000000000 000000 000000000000 00 00 00000000000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 "; my $str_b = '02e05f08f08e0b401709e0cb0980cd0f9115'. '13412d13c0620680b406c07301500d013006'; my ( $a, $t, @a, @b ); $str_a .= " \n" x 4; @b = ( $str_b =~ m/.../g ); # Nice foreach my $line ( split /\n/, $str_a ) { $a = -5; $t = 0; foreach my $char ( split //, $line ) { $t += $a if $char =~ /0/; $a++; } push @a, $t; } print grep{$_ = chr( $_ + 120 - hex shift @b )}@a;

You are creating two arrays of 24 elements, one for each character of "Just another Perl hacker".

The elements in the @a array are based on the total number of 0's in each line of the image (including 4 additional semi-blank lines).

The elements in the @b array are hexidecimal numbers split out of the $$ string. These arrays act like masks which you add together to generate the JAPH.


John.
--


In reply to Re: The Perl Couple by jmcnamara
in thread The Perl Couple by iamcal

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.