Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # list borrowed from http://www.codinghorror.com/blog/2008/06/ascii-pronunciation-rules-for-programmers.html
- my %chars = (
- '!' => [qw(bang pling excl not shriek factorial exclam smash cuss boing yell wow hey wham eureka spark-spot soldier)],
- '"' => [qw(literal double-glitch dieresis dirk rabbit_ears double_prime)],
- '#' => [qw(hash crunch hex mesh grid pound sharp grid crosshatch octothorpe flash square tictactoe scratchmark thud thump splat pigpen)],
- '$' => [qw(dollar currency buck cash string ding cache big_money)],
- '%' => [qw(percent mod grapes 007)],
- '&' => [qw(amp amper and address reference andpersand bitand background pretzel)],
- "'" => [qw(apostrophe single_quote quote prime glitch tick irk pop spark acute_accent)],
- '(' => [qw(lparen open wax parenthisey left_ear)],
- ')' => [qw(rparen close wane unparenthisey right_ear)],
- '[' => [qw(bracket square uturn)],
- ']' => [qw(unbracket unsquare uturn_back)],
- '{' => [qw(lsquiggley curley leftit embrace)],
- '}' => [qw(rsquiggley uncurley rytit bracelet)],
- '<' => [qw(read suck gozouta from crunch tic)],
- '>' => [qw(write blow gozinta into zap tac)],
- '*' => [qw(asterisk star splat wildcard gear dingle mult spider aster times twinkle glob)],
- '+' => [qw(plus add cross intersection)],
- ',' => [qw(comma cedilla tail)],
- '-' => [qw(dash hyphen minus worm option dak bithorpe)],
- '.' => [qw(period dot point decimal radix fullstop spot)],
- '/' => [qw(slash stroke slant diagonal solidus over slak virgule slat)],
- '\\' => [qw(backslash hack whack escape backslant backwhack bash rvirgule backslat)],
- ':' => [qw(colon dots twospot)],
- ';' => [qw(semicolon semiweenie hybrid pitthwong)],
- '=' => [qw(equals gets takes quadrathorpe halfmesh)],
- '?' => [qw(question query quiz whatmark what wildchar huh hook buttonhook hunchback)],
- '@' => [qw(at strudel each vortex whorl whirlpool cyclone snail ape cat rose cabbage commercial)],
- '^' => [qw(circumflex caret hat control uparrow xor chevron shark sharkfin fang exponent pointer)],
- '_' => [qw(underline underscore underbar skid flatworm)],
- '`' => [qw(grave backquote backprime backspark unapostrophe birk blugle backtick backglitch push quasiquote)],
- '|' => [qw(bar or vbar pipe vertical thru spike)],
- '~' => [qw(tilde squiggle twiddle not approx wiggle swungdash enyay)],
- );
- while (<>) {
- my $english = join('', (map {explain($_)} split('', $_)));
- $english =~ s/ +/ /g;
- $english =~ s/^ //g;
- print $english;
- }
- sub explain {
- my $c = shift;
- if ($ra = $chars{$c}) {
- return " " . $ra->[int(rand(scalar @$ra))] . " ";
- }
- return $c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement