diff --git a/chicken.pl b/chicken.pl index 39faf97..a051dc6 100755 --- a/chicken.pl +++ b/chicken.pl @@ -19,11 +19,8 @@ 'enumerate|en=i' => \$opt_enumerate, ) or die USAGE; -my @WORDS = ( - "puk", "pukaaak", "cluck", "cluck-cluck-cluck", "cluckity", "bwak", - "waaak", "bok", "bwok", "cluck-a-buh-gawk", "cock-a-doodle-doo", "bwwwaaaaaaaaaak", - "gobble-gobble", "honk", -); +my @WORDS + = ( "puk", "pukaaak", "cluck", "cluckity", "bwak", "waaak", "bok", "bwok", "cluck-a-buh-gawk", "cock-a-doodle-doo", "bwwwaaaaaaaaaak", "gobble", "honk", ); my @PUNCTUATIONS = ( ".", "...", "!", "?" ); @@ -48,6 +45,9 @@ my $word = $WORDS[ int( rand( scalar @WORDS ) ) ]; + # magic multiplier + $word = join( "-", ($word) x ( 4 - int( ( log( rand(7) + 1 ) / log(2) ) + 1 ) ) ); + # optionally add punctuation # note: always add punctuation if it's the last word.