Hello, I just want to print a line which contains "Homo sapiens". Thanks in advance!
open(IN1,"tmp01.txt") || die "Cannot open this file"; @lines1 = <IN1>; open(OUT,">tmp03") || die "Cannot open this file"; for $item1(@lines1){ chomp $item1; @tmp1=split(/\t+/, $item1); if ($tmp1[4] eq "Homo sapiens"){ print OUT @lines1; last } print OUT "\n"; } close(IN1); close(OUT);
In reply to print problem by yueli711
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |