in reply to The Perl Couple


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.
--