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.
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:
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 (<>
$file .= $_;
}
for($i=0;$char=substr($file,$i,1);$i++) {
print $lookup{lc($char)};
}
[Edited on Feb 07, 2005 11:00PM]