读书人

剔除带有“”的行

发布时间: 2012-11-26 11:48:50 作者: rapoo

删除带有“—”的行

原来的数据结构如下:

#!/usr/bin/perluse strict;use warnings;my @datas;my $data;my $numb=0;my $output;open (SNP,"without_repeat_information.txt")||die("can not open !");open (MORE,">without-without_repeat_information.txt")||die("can not open!");while(<SNP>){chomp($_);$output=$_;@datas=split;foreach $data(@datas) {if ($data=~"-"){$numb++;}else{next;}}if ($numb==0){$numb=0;print MORE "$output\n";}else{$numb=0;}}


读书人网 >编程

热点推荐