In regards to an old post about a
caesar shift solution, I have tried my skills to approach this in an efficient way and came up with the following:
#!/usr/bin/perl -w
#
# Caesar shift decrypting script
# Author: Aleksandr Melentiev <tzapper@users.sf.net>
# Redistributable under the BSD License
use strict;
use warnings;
print "Enter encrypted string:\n";
chomp(my $cipher = <STDIN>);
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));
}