Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Turn text upside down

by WWWWolf (Initiate)
on May 18, 2000 at 13:49 UTC ( [id://12440]=perlcraft: print w/replies, xml ) Need Help??

   1: #!/usr/bin/perl -w
   2: # prints stuff upside down.
   3: # (c) Weyfour WWWWolf 2000-05-18
   4: # Inspired by WolfZone's similiar program =)
   5: 
   6: use strict;
   7: 
   8: while(<>) {
   9:   chomp;
  10: 
  11:   # Punctuation
  12:   #            !""()'',.
  13:   tr/!""()'',./i``)(,,'`'/;
  14: 
  15:   # Numbers (Probably the easiest part)
  16:   #             0123456789
  17:   tr/0123456789/0l5Eh29L86/;
  18: 
  19:   # Characters
  20:   #         abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  21:   tr/a-zA-Z/eqopaJ@y!f>jwuodbJs+n^mxhzV8D43J9HIf>IWNOJOJSLAAMXhZ/;
  22: 
  23:   print "", (reverse split //), "\n";
  24: }

Replies are listed 'Best First'.
absolutely nasty.
by da w00t (Sexton) on May 22, 2000 at 21:50 UTC
    oh god that's nasty. but it's cute. :)
(zdog) RE: Turn text upside down
by zdog (Priest) on Jun 05, 2000 at 01:37 UTC
    That's kinda cool. I must comend you on your creativity in flipping each letter upsidedown. However, you could improve on this by including other symbols (puctuation) like ? @ and ^. But those are minor things.

    -- zdog (Zenon Zabinski)
       Go Bells!!

      Yeah. you can use chr() for that. ¿ is chr(168). I'm sure you can figure out the rest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-23 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found