输出后当作输入文件

foreach my $i (@region){
        $all++;
        @Rgene = split " ",$i;
        system "samtools depth -r $Rgene[1] $bam > $all.txt";
        my $file = "$all.txt";
#       print $file," ";
        open(IN2,"$file");
        while(<IN2>){
                chomp;
                $sum++;
                my @line = split " ";

原文地址:https://www.cnblogs.com/blueicely/p/3385945.html