2024 π Daylatest newsbuy art
Love itself became the object of her love.Jonathan Safran Foercount sadnessesmore quotes
very clickable
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
#9
Spring 1998
vol 3
num 1
Stately Scripting with mod_perl
CGI too slow? Compiled C too slow? Try mod_perl.
Chatbot::Eliza
A Perl module that imitates a psychiatrist.
CryptoContext
Context, prototypes, and subroutine calls.
Perl/Tk: Modeling Mowing Techniques
Painting a canvas.
Perl News
What's new in the Perl Community.
die()ing on the Web
Four techniques for handling errors in CGI scripts gracefully.
How Regexes Work
Build your own regular expression engine.
Software Construction with Cons
The trouble with Makefiles.
The Perl Journal One Liners
(1998) The Perl Journal One Liners. The Perl Journal, vol 3(1), issue #9, Spring 1998.

The Perl Journal One Liners


TPJ One-Liner #7

An Absurd Way To Convert From Decimal To Binary


#!/usr/bin/perl

($decimal, $binary) = (shift, '');
$SIG(USR1) = sub { $binary .= "0"};
$SIG(USR2) = sub { $binary .= "1"};

do { kill $decimal & 1 ? 'USR2' : 'USR1' , $$;
     $decimal >>= 1;
} while ($decimal);

print scalar reverse $binary;

Courtesy of Nathan Torkington

TPJ One-Liner #8

How To Patch Your Netscape Binary To Enable Strong Encryption


#!/usr/bin/perl -0777pi
s/TS:.*?\0/$_=$&;y,a-z, ,;s,    $,true,gm;s, 512,2048,;$_/es

Courtesy of Ian Goldberg.

TPJ One-Liner #9

How To Use The Perl Debugger as a Command-Line Interpreter


perl -de 0

TPJ One-Liner #10

Using PDL to Generate Fractals


use PDL; use PDL::IO::Pic;$a=zeroes 300,300;
$r=$a->xlinvals(-1.5,0.5);$i=$a->ylinvals(-1,1);
$t=$r;$u=$i;for(1..30){$q=$r**2-$i**2+$t;$h=2*$r*$i+
$u;$d=$r**2+$i**2;$a=lclip($a,$_*($d>2.0)*($a==0));($r,
$i)=map{$_->clip(-5,5)}($q,$h);}$a->wpic("mandel.gif");

Courtesy of Tuomas J.Lukka.

Martin Krzywinski | contact | Canada's Michael Smith Genome Sciences CentreBC Cancer Research CenterBC CancerPHSA
Google whack “vicissitudinal corporealization”
{ 10.9.234.151 }