#!/usr/bin/ruby -w # Classical rot13 filter. # # File is named "caesar" for Caesar cipher to avoid prefix conflict with # the rotate scripts. ARGF.each_char{|c| if (c >= "A" && c <= "Z") || (c >= "a" && c <= "z") print (((c.ord & 0x1f) - 1 + 13) % 26 + (c.ord & ~0x1f) + 1).chr else print c end }