in reply to Kiddie Codes

For the cyphertest lookup try using the indexes of your arrays as keys. This should be speedy and cheaper from a memory standpoint.

Split your cyphertext 'letters' into two digits. Then create a list of list references.Something like this:

@ct[2,5,8]=['d', 'j', 'f', 'b', 'g', 'q', 'k', 's', 'r', 'l']; print $ct[2][3]; # Should print b.

Warning:code untested as all get out.