in reply to (Golf) Untwist
sub decipher { @n=split//,'_abcdefghijklmnopqrstuvwxyz.';$l{$n[$_]}=$_ for 0..$#n;@c= +map{$l{$_}}split//,pop;$p[$_[0]*$_%@c]=$n[($c[$_]+$_)%@n]for 0..$#c;j +oin'',@p }
I was trying to find a way to not do the whole listing out of the 28 characters, but couldn't figure a way to get a-z into there. That could cut up to 23 characters, bringing me to 124.
Update: I've figured out a way to improve that string assignment. I feel stupid, but it's better now, down to 120. (Thanks, boo_radley!)
@n=(_,a..z,'.');map{$l{$n[$_]}=$_}0..27;@c=map{$l{$_}}split//,pop;$p[$ +_[0]*$_%@c]=$n[($c[$_]+$_)%@n]for 0..$#c;join'',@p
------
/me wants to be the brightest bulb in the chandelier!
Vote paco for President!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Golf) Untwist (boo)
by boo_radley (Parson) on Aug 16, 2001 at 02:24 UTC |