#!/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| x = c.ord print ((x > 64 && x < 91) || (x > 96 && x < 123) ? ((x % 32 + 12) % 26 + (x & ~31) + 1).chr : c) }