#!/usr/bin/perl -w use strict; use warnings; # slowcat - emulate a slow line printer # usage: slowcat -DELAY files ... my $DELAY = ($ARGV[0] =~ /^-(.\d+)/) ? (shift, $1) : 1; $| = 1; while (<>) { for (slit(//)) { print; select(undef,undef,undef, 0.005 * $DELAY); } }