#!/usr/bin/perl
#
#	An alternate simple substitution cipher to ROT13
#	written by Jan Engelhardt, 2013
#
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the WTF Public License version 2 or
#	(at your option) any later version.
#

use utf8;
binmode STDIN, ":utf8";
binmode STDOUT, ":utf8";
if ($ARGV[0] eq "-d") {
	shift @ARGV;
	while (<>) {
		tr[☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼]{ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^};
		print;
	}
} else {
	while (<>) {
		tr[a-z][A-Z];
		tr{ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^}[☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼];
		print;
	}
}
