aproximation:
Clever!
Rotate the alphabet by half.

ah me, what a day.. what a day. my blurred vision will welcome this happy sleep, though it is a long journey to unconsciousness at this thoughtful rate. i fear that i shall toss myself right out of the bed and i turn and turn, ponder and worry... it is not so much these fears that keep me awake, but the fact that i think about them so much.


#!/usr/bin/perl -w

use strict;

my($char,$file,%lookup,$i,$poop);
%lookup = (
"a" => "n",
"b" => "o",
"c" => "p",
"d" => "q",
"e" => "r",
"f" => "s",
"g" => "t",
"h" => "u",
"i" => "v",
"j" => "w",
"k" => "x",
"l" => "y",
"m" => "z",
"n" => "a",
"o" => "b",
"p" => "c",
"q" => "d",
"r" => "e",
"s" => "f",
"t" => "g",
"u" => "h",
"v" => "i",
"w" => "j",
"x" => "k",
"y" => "l",
"z" => "m",
"\n" => "\n",
" " => " ",
"." => ".",
"," => ","
);

while (<>wink {
$file .= $_;
}

for($i=0;$char=substr($file,$i,1);$i++) {
print $lookup{lc($char)};
}

[Edited on Feb 07, 2005 11:00PM]

quasi_sean:
thanks...my brain is bleeding now....and i still have no idea what you are saying...
sigmatic:
If you run linux, there's a good chance that you have the "rot13" shell command installed in your path. So you could just pipe the message text into that bad boy and read away. No perl hacking required.

Alternatley, here's a slightly more compact translator:

#include <stdio.h>
void main(){int c;while(!feof(stdin)){c=getchar();putchar((c>='A'?(c<='M'?c+13frownc<='Z'?c-13frownc>='a'?(c<='m'?c+13frownc<='z'?c-13:c)):c))):c));}}
sigmatic:
Fucking smileys.
bones_708:
I admit I'm lazy, and this seems way to much like work. wink