#!/usr/bin/perl # extreme whitespace # performance typing v.0.1 # amy alexander/uebergeek/deprogramming.us # simple version # just type. # copyright/left 2003 - released under the Gnu Public License # http://www.gnu.org/licenses/gpl.txt # full version available at http://deprogramming.us # sorry, doesn't seem to work properly on perl 5.8 - works on perl 5.6 and 5.6.1 use Time::HiRes(usleep); # you might need to download this from cpan.org use Term::ReadKey; # this too. $|=1; $starttime = time; $startphrase = ' '; $phrase = $startphrase; while (1) { if (int(rand(700)) == 2) { $phrase = $startphrase; } print "$phrase "; usleep (300); ReadMode 3; $key = ReadKey(-1); $now = time; if ((defined($key)) and ($now > $starttime + 5)) { $phrase = $phrase.$key; } ReadMode 0; # this may appear redundant, but has a subtle visual effect. }