Previous <-->
Next <==>
All
#!/usr/local/bin/perl -s
$ENV{'PATH'} .= ":$ENV{'HOME'}/l/fun/bin:" .
"$ENV{'HOME'}/l/fun/bin/$ENV{'ARCHIT'}:" .
"/usr/local/games:/usr/games";
$ENV{'PATH'} .= ":/u/kinzler/l/fun/bin:/u/kinzler/l/fun/bin/sun4";
$dfltnum = 5;
# haiku - front-end for haiku spewer
# Development version 04: add number argument and usage message
# Steve Kinzler, kinzler@cs.indiana.edu, Jan 96
$usage = "usage: $0 [ number ]
The given number of haiku are generated, default $dfltnum.\n";
die $usage if $h || $ARGV[0] !~ /^\d*$/;
$num = $ARGV[0] || $dfltnum;
###############################################################################
open(HAIKU, "spew $num haikus |") || die "$0: cannot run spew ($!)";
while (<HAIKU>) {
print;
}
close HAIKU;