Home

Meow, MEOW, meow! Truck.

  • Aug. 31st, 2008 at 5:45 PM
"meow.pl":
#!/usr/bin/perl
# Runs from Mac OS X

my $n = 1;
my @voices = qw(bruce alex fred kathy vicki victoria);

$| = 1;


do {
    $voice = $voices[int(rand($#voices+1))];
    $out = "meow";
    $out =~ s/e/ee/ if (rand() < 0.2);
    $out .= '!' if (rand() < 0.4);
    $out = 'Truck' if (rand() < 0.05) && ($n > 3);
    system('/usr/bin/say', '-v', $voice, $out);
    $n++;
} while($n < 20);

system('/usr/bin/say', '-v', $voice, 'Truck');

Tags:

Profile

[info]joel
Joel Franusic
Website

Advertisement

Latest Month

March 2009
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Syndicate

RSS Atom
Powered by LiveJournal.com
Designed by Lilia Ahner