如何一次读一整块文本?[解决了]

如何一次读一整块文本?[解决了]



[Copy to clipboard] [ - ]
CODE:
ID   cel-let-7         standard; RNA; CEL; 99 BP.
XX
AC   MI0000001;
XX
DE   Caenorhabditis elegans let-7 stem-loop
XX
RN   [1]
RX   PUBMED; 11679671.
RA   Lau NC, Lim LP, Weinstein EG, Bartel DP;
RT   "An abundant class of tiny RNAs with probable regulatory roles in
RT   Caenorhabditis elegans";
RL   Science. 294:858-862(2001).
XX
RN   [2]
RX   PUBMED; 12672692.
RA   Lim LP, Lau NC, Weinstein EG, Abdelhakim A, Yekta S, Rhoades MW, Burge CB,
RA   Bartel DP;
RT   "The microRNAs of Caenorhabditis elegans";
RL   Genes Dev. 17:991-1008(2003).
XX
RN   [3]
RX   PUBMED; 12747828.
RA   Ambros V, Lee RC, Lavanway A, Williams PT, Jewell D;
RT   "MicroRNAs and other tiny endogenous RNAs in C. elegans";
RL   Curr Biol. 13:807-818(2003).
XX
RN   [4]
RX   PUBMED; 12769849.
RA   Grad Y, Aach J, Hayes GD, Reinhart BJ, Church GM, Ruvkun G, Kim J;
RT   "Computational and experimental identification of C. elegans microRNAs";
RL   Mol Cell. 11:1253-1263(2003).
XX
RN   [5]
RX   PUBMED; 17174894.
RA   Ruby JG, Jan C, Player C, Axtell MJ, Lee W, Nusbaum C, Ge H, Bartel DP;
RT   "Large-scale sequencing reveals 21U-RNAs and additional microRNAs and
RT   endogenous siRNAs in C. elegans";
RL   Cell. 127:1193-1207(2006).
XX
DR   RFAM; RF00027; let-7.
DR   WORMBASE; C05G5/12462-12364; .
XX
CC   let-7 is found on chromosome X in Caenorhabditis elegans [1] and pairs to
CC   sites within the 3' untranslated region (UTR) of target mRNAs, specifying
CC   the translational repression of these mRNAs and triggering the transition
CC   to late-larval and adult stages [2].
XX
FH   Key             Location/Qualifiers
FH
FT   miRNA           17..38
FT                   /accession="MIMAT0000001"
FT                   /product="cel-let-7"
FT                   /evidence=experimental
FT                   /experiment="cloned [1-3,5], Northern [1], PCR [4]"
XX
SQ   Sequence 99 BP; 26 A; 19 C; 24 G; 0 T; 30 other;
     uacacugugg auccggugag guaguagguu guauaguuug gaauauuacc accggugaac        60
     uaugcaauuu ucuaccuuac cggagacaga acucuucga                               99
//

文件格式如下,怎么样才能以//为终止符,一次读这一整块呢?

特殊变量  $/  
是这个么?
open(FILE,"<$filename") or die "$!";
my $filestr;
foreach (<FILE>) {
      $filestr .= $_;
}
close(FILE);
while ($filestr =~ /(.*?\/\/)/msig){
       print $1;
}
thanks

就是它啦。

我记得在那看过,就是总想不起来。


QUOTE:
原帖由 YGC 于 2008-1-3 17:26 发表
thanks

就是它啦。

我记得在那看过,就是总想不起来。

perldoc perlvar