高手帮忙

高手帮忙

高手帮忙
统计dna序列中碱频率 代码如下 ;
#!\usr\bin\perl -w
open(DNAFILE, "lizi.pl");
@DNA = <DNAFILE>;
close DNAFILE;
$count_of_A = 0;$count_of_C = 0;
$count_of_G = 0;$count_of_T = 0;
$errors   = 0;
$DNA = join( ‘’, @DNA); #将文件中的内容连成一行;
$DNA =~ s/\s//g; #去掉空格!
@DNA = split( ‘’, $DNA ); #将标量转换成字符数组;


foreach $y(@DNA) {
  if   ( $y eq 'A' ) { ++$count_of_A; }
  elsif ($y eq 'C') { ++$count_of_C; }
  elsif ( $y eq 'G') { ++$count_of_G; }
  elsif ($y eq 'T' ) { ++$count_of_T; }
  else { print "!!!!!!!! Error - I don\'t recognize this base:$y \n"; ++$errors;}
}

print "A = $count_of_A\n";
print "C = $count_of_C\n";
print "G = $count_of_G\n";
print "T = $count_of_T\n";
print "errors = $errors\n";
运行后 为什么是这样的呢
unrecognized character \xA1 an line 8
/xA1 是什么啊 怎么修改
还有个简单的问题
模块中的 -> 是什么符号啊 比如bio::tools ->new(@yan)
还有/^>/ 是什么意思啊
bio::tools ->new(@yan.
bio::tools ->new(@yan) 是调用对象的 new 方法,和 c++ 的对象相似
/^>/ 表示 不匹配以 > 开头的行,比如 fasta 文件的 >accession 行