* Added pirate filter. TODO: copyright, man page integration, makefile int
[filters.git] / jibberish
CommitLineData
7e3afbba 1#!/usr/bin/perl
e99ec255 2# jibberish -- run filters in random order
7e3afbba 3
4$ENV{PATH}.=":/usr/games";
5
6@all= qw(
dc17484a 7eleet
8b1ff
9chef
10jethro
11upside-down
12kraut
13cockney
7e3afbba 14jive
7e3afbba 15nyc
bc19f2cf 16ken
17ky00te
0652168f 18rasterman
7e3afbba 19newspeak
9edc0e61 20studly
e99ec255 21censor
22spammer
7e3afbba 23);
24
25# shuffle order
26srand;
27for (0..$#all) {
28 my $n= @all*rand;
29 my $was= $all[$_];
30 $all[$_]= $all[$n];
31 $all[$n]= $was;
32}
33
34# start the pipe...
e99ec255 35my $pipe= join '|', @all[0..3 + rand(5)];
7e3afbba 36open FILTER, "$pipe|"
e99ec255 37 or die "Never mind...\n";
7e3afbba 38
39# display the results
40while (<FILTER>) {
41 print $_
42}
43
44# This could be optimized: take the last program off the pipeline,
45# open the pipeline as standard input, then exec that last program.
46#
47# But you have to ask yourself: how important is it to optimize
48# the generation of jibberish?
This page took 0.011954 seconds and 4 git commands to generate.