Very Good!
The way it works basically, i to combine the numbers from two arrays (@a and @b) to get the ascii values of the characters. Since @a is just the numbers 0 to 23, all the real work is done by @b.
Now, the variables $a to $h are loaded with various values (mostly small primes). The @c array is then loaded with expressions which evaluate to the numbers needed to make @b. If ($a+$b)-$c is needed to make the value (and we can make any value since we chose good primes) then it's written to @c as "(ab)-c".A quick regex later and we can add $'s before each letter and +'s where nessacery. Now eval'ing these into @b give us our second list.
Line 3 ($a=q;$b=3;

is meant to throw you. At first glane it looks like $a='q'; $b=3; which would override the previous value of $b. It actually just tricky use of the single quotish operator using a semi comma to delimit.
Right. Now for something slightly different:
Just a thought
