Help for this page

Select Code to Download


  1. or download this
     my $dna=();
     foreach my $dna (@random_DNA) { # Line 19 
    ...
    print RESULT"\n Randomly Generated dna:\n
     The DNA set containing $number molecules varying in length from $minl
    + to $maxl bases are:\n\n
     my $dna\n";
    
  2. or download this
    my $number= <STDIN>;
    
    my $maxl= <STDIN>;
    
      my $minl= <STDIN>; # Line 10
    
  3. or download this
      srand(time|$$);
    
  4. or download this
     my $dna;                        # Line 40
     # Set of DNA fragments 
    ...
     # add $dna fragment to @set Line 47:  
      push (@set,$dna);}
      return @set;}  # Line 49
    
  5. or download this
    # Now write the subroutine make_random_DNA:
    sub make_random_DNA {                      # Line 57      
    ...
     for (my $i=0;$i<$length;++$i) {
     $dna.=randomnucleotide();}                # Line 62   
     return $dna;}
    
  6. or download this
    #!/usr/bin/perl
    # Program to generate Random DNA set:
    ...
            return join '', map $nucleotides[ rand @nucleotides ], 1 .. $l
    +ength;
            }