Stunning, to say the least, but what is more stunning is
the amateurish oversight that I made myself when posting my
entry. How could I have not used the range feature of
tr?
I feel silly, but at least I'm not alone:
sub f {
$_=pop;y/ACUG/0-3/;s|(.)(.)(.)|(map{ord>91?uc:(),uc}
'KnKttiIMRsRQhQppllrr.y.ssLfL.cWEdEaavvgg'=~/./g)[$1*16+$2*4+$3]|eg;$_
}
I was looking at my entry, trying to save a few strokes,
motivated by
scain's
Benchmarks posted below. It was
immediately obvious how to save a few strokes, now that I'm
awake and caffinated and all.
Revised, mine ended up at 133, still a ways off of
MeowChow at the
new and improved 122 posted above:
sub f{
$_=pop;y/UCAG/0-3/;s/(.)(.)(.)/substr
"FFLLSSSSYY..CC.WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG",
$1<<4|$2*4|$3,1/ge;s/\d//g;$_
}