data
+ munging
The Perl Journal
Volumes 1–6 (1996–2002)
Code tarballs available for issues 1–21.
I reformatted the CD-ROM contents. Some things may still be a little wonky — oh, why hello there <FONT>
tag. Syntax highlighting is iffy. Please report any glaring issues.
The Perl Journal
#10
Summer 1998
vol 3
num 2
The essentials of data structures.
Mark-Jason Dominus
IRC Robots And The People Who Love Them.
Kevin Lenzo
The Next Big Perl.
Gurusamy Sarathy
Using an HTML filter to read a foreign language.
Tuomas J. Lukka
The Getopt::Long module and friends.
Johan Vromans
What to do when your CGI scripts need superuser powers.
Lincoln Stein
What's new in the Perl community.
Jon Orwant
Controlling Excel, Notes, and Access with Win32::OLE.
Jan Dubois
Rendering three-dimensional images.
Mark-Jason Dominus
Parallel execution paths in Perl.
Dan Sugalski
Modules to help you bulletproof your code.
Randy J. Ray
(1998) The Perl Journal One-Liners. The Perl Journal, vol 3(2), issue #10, Summer 1998.
The Perl Journal One-Liners
TPJ One-Liner The Game Of Life
use PDL; use PDL::Image2D;
use PDL::Graphics::TriD;nokeeptwiddling3d;
$d=byte(random(zeroes(40,40))>0.85);
$k=byte [[1,1,1],[1,0,1],[1,1,1]];
do{ imagrgb [$d]; $s=conv2d($d,$k);
$d&=($s>4);$d&=($s>1);$d|=($s==3);}
while (!twiddle3d);
Courtesy of Robin Williams. |
TPJ One-Liner DeMorgan's Rule: |
if (!$a || $b != $c) { ... }
is equivalent to
unless ( $a && $b == $c ) { ... }