Help for this page

Select Code to Download


  1. or download this
    my %value = (
      G => 0,
    ...
      T => 2,
      C => 3,
    );
    
  2. or download this
    $number = $w[$n]*(4**$n) + $w[$n-1]*(4**($n-1)) + ... + $w[0]
    
  3. or download this
    sub word_to_number {
      my (@w) = @_;
    ...
        $res += $value{ pop @w };
      };
    };
    
  4. or download this
    open my $frequencies, ">+", 'frequencies.bin'
      or die "$!";
    ...
      seek $requencies, $offset * 4;
      write $frequencies, pack "N", $count;
    };