亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

perl 指定長(zhǎng)度并生成一個(gè)隨機(jī)的DNA序列的腳本代碼

 更新時(shí)間:2013年03月01日 11:23:07   作者:  
perl 指定長(zhǎng)度并生成一個(gè)隨機(jī)的DNA序列的代碼,有需要的朋友可以參考下

復(fù)制代碼 代碼如下:

#!/bin/perl

use strict; 
use warnings;

#進(jìn)行定義 
my @dna; 
my $dna_length; 
my $newbase; 
my $i=0; 

print "please input the DNA length\n"; 
chomp($dna_length=<>); 

while($i<$dna_length) 

  #從四個(gè)堿基中隨機(jī)選取一個(gè) 
  my(@nucleotides)=qw/A T G C/; 
  $newbase=$nucleotides[rand @nucleotides]; 

  #將隨機(jī)生成的序列添加到@dna的數(shù)組中 
  push(@dna,$newbase); 
  ++$i; 

print "@dna";

相關(guān)文章

最新評(píng)論