#!/usr/bin/perl -w # # Caesar shift decrypting script # Author: Aleksandr Melentiev # Redistributable under the BSD License use strict; use warnings; print "Enter encrypted string:\n"; chomp(my $cipher = ); my @alphabet = ('A' .. 'Z'); for (@alphabet) { my $text = $cipher; my $rot = join("", @alphabet); eval "\$text =~ tr/a-zA-Z/$rot/, 1" or die $@; print "ROT: $text\n"; push(@alphabet, shift(@alphabet)); }