================================================================================ http://en.wikipedia.org/wiki/ROT13 ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple substitution cipher used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13 has been described as the "Usenet equivalent of a magazine printing the answer to a quiz upside down".[1] ROT13 is a variation of the Caesar cipher, developed in ancient Rome. ROT13 is its own inverse; that is, to undo ROT13, the same algorithm is applied, so the same action can be used for encoding and decoding. The algorithm provides no real cryptographic security and should never be used for such. It is often cited as a canonical example of weak encryption. ROT13 has inspired a variety of letter and word games on-line, and is frequently mentioned in newsgroup conversations. ================================================================================ Write a program that takes a rotation amount, an input file and an output file, rotates the characters in that file and writes the rotated output to the output file. An example of calling the program is: perl rotate.pl 13 inp.txt out.txt Given an input file (inp.txt): -------------------------------------------------------------------------------- This is some sample text. It should be rotated. -------------------------------------------------------------------------------- The output of the above (out.txt) should look like: -------------------------------------------------------------------------------- Guvf vf fbzr fnzcyr grkg. Vg fubhyq or ebgngrq. --------------------------------------------------------------------------------