Hello!
I'm having a problem on line 12 of this program.The idea of the program is to split a RNA,DNA,Protein sequence into kodons but I get error at line 12.Some help will be nice.If you have any questions please ask I will answer here is the code:
#!usr/bin/perl
$seq = <STDIN>;
chomp $seq;
$size = length $seq;
$size = $size/3;
@kodoni;
for($a=0;$a<$size;$a++){
$NT=0;
$index=0;
$kod=substr($seq,$NT,3);
%kodon=($index);
$kodon{$index}=$kod;
push(@kodoni,$kodon{$index});
$index++;
if($NT<$size){
$NT = $NT+3;};
};
print "Sekvenciq: ".$seq."\n";
print "Razmer na sekvenciqta: ".$size."\n";
print "Kodoni: ";
for($a=0;$a<$#kodoni;$a++){
print @kodoni[$kodon{$a}]." ";
};
P.S: Fixed it !