Also close bug
[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
32a7bed8 15pirate
7e3afbba 16nyc
bc19f2cf 17ken
18ky00te
0652168f 19rasterman
7e3afbba 20newspeak
9edc0e61 21studly
e99ec255 22censor
23spammer
7e3afbba 24);
25
26# shuffle order
27srand;
28for (0..$#all) {
29 my $n= @all*rand;
30 my $was= $all[$_];
31 $all[$_]= $all[$n];
32 $all[$n]= $was;
33}
34
35# start the pipe...
e99ec255 36my $pipe= join '|', @all[0..3 + rand(5)];
7e3afbba 37open FILTER, "$pipe|"
e99ec255 38 or die "Never mind...\n";
7e3afbba 39
40# display the results
41while (<FILTER>) {
42 print $_
43}
44
45# This could be optimized: take the last program off the pipeline,
46# open the pipeline as standard input, then exec that last program.
47#
48# But you have to ask yourself: how important is it to optimize
49# the generation of jibberish?
This page took 0.013148 seconds and 4 git commands to generate.