作者imce (蜥蜴)
看板perl
標題Re: [問題] 請問如何寫到新檔案裡
時間Tue Dec 26 17:54:55 2006
※ 引述《robbor ( 工作中的貓頭鷹)》之銘言:
#!/usr/bin/perl
# sort.plx
use warnings;
use strict;
open FILE, "NC_000964.faa" or die $!;
open File,">1234.txt" or die $!;
my $lineno = 1;
while (<FILE>) {if (/^>/){
print
File $lineno++;
print
File ": $_">;
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.120.15.17
1F:→ robbor:謝謝指導。 12/27 17:58