for ( unpack("(A3)*",$rna)) { if (exists($gencode{$_})) { $protein.=$gencode{$_}; } else { die "No mapping for [$_]\n"; } }