1998 The Perl Journal Obfuscated Perl Contest.
Entry for Category 3 (Best "The Perl Journal") by
Sven Neuhaus <sven@ping.de> and Michael Stiller <michael@ping.de>
Version 1.1, July 23rd 1998

Explanation of the program:

We started off using what we considered a "hole" in the contest rules:
Whitespace doesn't count towards the script's size. We wrote up an
algorithm that decodes blanks and newlines into bits and packs them
together as bytes. The bytes are then printed using chr().

To make things more interesting, we added some major obfuscation by
putting everything into anonymous subroutines.
The outermost sub contains 10 anonymous subroutines:
	 0: eval
	 1: chr &{$sub[8]}    ( = chr shift)
	 2: print &{$sub[8]}  ( = print shift)
	 3: y/\n /10/
	 4: split//
	 5: $_[0] x 8         (not a subroutine actually)
	 6: (1<<$task++ % 8) * &{$sub[9]}
	                      ( = (1<<$task++ % 8) * pop)
	 7: the main function
	 8: shift
	 9: pop
	10: $count++ % 3

The subs 6 and 10 are closures with an internal state:
Sub 6 pops one element (a 0 or a 1) off @_ and multiplies it by
2^0 .. 2^7, restarting at 2^0 after 8 runs thus forming one byte
at a time when called 8 times.
Sub 10 just counts from 0 to 2 repeatedly.

The outermost function is called after it's declared. It's parameter
is used in the 5th list element and returns 8 times the given string
"+&{$;[6]}". This string will be eval()ed later to call subroutine 6
eight times form a byte.

Next, the long string is assigned and the main subroutine (7) is
called (at the end of the file).

The unobfuscated main subroutine (7) looks like this:
{
	y/\n /10/;    # convert newlines and blanks into '1's and '0's.
	split//;
	$_ = '+&{$;[6]}' x 8;     # string for eval.
	print chr eval while(@_);
}

The subroutine 10 is used to provide the index to the functions, 
calling them incrementally. (  &{$sub[&{$sub[10]}]}  )

The eval does the work of forming 8 bits into 1 byte, the rest
is pretty straightforward.
The variable names ("$;", "$/" etc.) were chosen to add to the confusion.

The string containing the spaces and newlines was generated using another 
small perl script. This script is left as an exercise for the jury (or
we'll send you ours ;-)

If you pipe the source through 
perl -0 -ne 'print y/ \n//c;'
you will see how small the program is according to the contest rules
(whitespace does not count towards the source code size).

We hope that pretty much clears things up, if you still have
questions, drop us a mail at <sven@ping.de> and <michael@ping.de>.
We will be happy to discuss the obfuscation...

