I know its not the greatest, but I like to hear other people's suggestions on how to make it shorter.$dna = '$dna = CAC;B%t = (C65C,"$dna",C66C,"\n",C67C,"C");Bfor($i=0;$i +<153;$i++)B{$q = ord(substr($dna,$i,1));Bif ($t{$q}) {print $t{$q};}B +else {print chr($q);}}'; %t = ('65',"$dna",'66',"\n",'67',"'"); for($i=0;$i<153;$i++) {$q = ord(substr($dna,$i,1)); if ($t{$q}) {print $t{$q};} else {print chr($q);}}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Asexual Perl Code
by MeowChow (Vicar) on May 01, 2001 at 05:04 UTC | |
|
Re: Asexual Perl Code
by larsen (Parson) on May 01, 2001 at 05:03 UTC | |
by beefalo (Acolyte) on May 01, 2001 at 05:14 UTC |