Help for this page

Select Code to Download


  1. or download this
    sub mismatches {
      my($source, $target) = @_;
    ...
      my %seen = map +($_ => 1), $s =~ /[^\[\]]/g;
      scalar grep $seen{$_}, $t =~ /[^\[\]]/g;
    }
    
  2. or download this
    my %bits = ('A' => 1, 'C' => 2, 'G' => 4, 'T' => 8);
    my $source1 = bitwise('[TCG]GGGG[AT]');
    ...
        chr($char)
      } $string =~ /(\[.*?\]|.)/g;
    }