http://www.perlmonks.org?node_id=937647


in reply to Re^3: Why does this sub grab the whole hash
in thread Why does this sub grab the whole hash

Changing the subs code to..

sub revcompl { my (@dna) = @_; my @dr=(); foreach my $segment (@dna) { my $revcomp = reverse($segment); $revcomp =~ tr/ACGTacgtMKRYBDHVmkrybdhv/TGCAtgcaKMYRVHDBkmyrvhdb/; push @dr, $revcomp; } $done = join('',@dr); return $done; }

Worked out well. Thank you very much. The behaviour noticed before still weirds me out, guess it's time to study some more. Any more enlightening comments on what happened there are welcome by everybody :D