Help for this page

Select Code to Download


  1. or download this
    use List::Util qw( sum );
    
    my $sum = sum map { $array[$_][$col] } 0..$#array;
    
  2. or download this
    my $sum = 0;
    for my $row (0..$#array) {
       $sum += $array[$row][$col];
    }
    
  3. or download this
          my $nextline = <FASTA>;
          if($nextline =~ /^(\S+)$/) {
    ...
              my $nextline = <FASTA>;
              if($nextline =~ /^(\S+)$/) {
                $qual = $1;
    
  4. or download this
          my $nextline = <FASTA>;
          redo if $nextline !~ /^\S+$/;
    ...
          redo if $nextline !~ /^\S+$/;
    
          chomp( my $qual = $nextline );