Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!wnoc-kyo-news!kuis-news!s2000!beauty!clair.noc.fujita-hu.ac.jp!fame.fujita-hu.ac.jp!chiba-ns!odins-suita!itserv.it.okayama-u.ac.jp!elecnews!libero!yama
From: yama@biotech.okayama-u.ac.jp (Mamoru Yamanishi)
Subject: Re: get the lines with match pattern
Sender: news@plasma.elec.okayama-u.ac.jp
Message-ID: <yama-1707971022340001@libero.biotech.okayama-u.ac.jp>
Date: Thu, 17 Jul 1997 01:22:34 GMT
Content-Type: text/plain; charset=iso-2022-jp
References: <5qieoj$gjd@base.econ.osaka-u.ac.jp>
Nntp-Posting-Host: libero.biotech.okayama-u.ac.jp
Mime-Version: 1.0
Organization: Okayama Univ., Biotech. Dept.
X-Newsreader: NewsWatcher-J 2.0J16
Lines: 31
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:2181
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=2181&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

> $B!!(Bperl -ne 'print if (/caravan/ ? ($c = 6): (--$c > 0))' sample.txt
> $B$N$h$&$K5-=R$,$"$C$?$N$G$9$,!"$3$l$HF1$8F0:n$r0l$D$N(Bcgi(perl)
> $B%W%m%0%i%`$N$J$+$G9T$$$?$$$G$9!#!JMW$9$k$K(Bperl$B$H$$$&5-=R$J$7$G!K(B

perl$B$KEO$5$l$F$$$k5/F0;~%*%W%7%g%s!J%3%^%s%I%i%$%s%9%$%C%A!K$N0UL#$r(B
$B9M$($k$H!"$I$N$h$&$J%9%/%j%W%H$r=q$1$PNI$$$+H=$k$O$:$G$9!#(B

-e$B$O!"%9%/%j%W%H$r%U%!%$%k$+$iFI$`Be$o$j$K(B'hoge'$B$r<B9T$9$Y$-%9%/%j%W%H(B
$B$H$7$F;HMQ$9$k$H$$$&$b$N$@$C$?$H;W$$$^$9!#(B

-n$B$O!"<B9T$9$Y$-%9%/%j%W%H$r(B
      while(<>){
         hoge;
      }
$B$N$4$H$/I>2A$;$h$H$$$&$b$N$@$H;W$$$^$9!#(B

$B$8$c$"!"$3$3$N(B<>$B$O$H$$$&$H!"0z?t(Bsample.txt$B$rB8:_$7$F$$$k%U%!%$%kL>$H(B
$B2r<a$7$F!"$3$N%U%!%$%k$+$i0l9T$:$DFI$_9~$`$3$H$K$J$k$N$8$c$J$+$C$?$+$J!#(B

> $B$^$?$3$N(Bsample.txt$B$N%G%#%l%/%H%j$r;XDj$9$k$K$O$I$&$9$l$P(B
> $BNI$$$N$G$7$g$&$+!#(B

$BL@<(E*$K(Bopen$B$G%U%!%$%k$r;XDj$9$l$P!"G$0U$N%Q%9$N%U%!%$%k$r;XDj(B
$B$G$-$^$;$s$+!)$3$N%U%!%$%k%O%s%I%k$r(B
      while(<HOGE>)....
$B$N$h$&$K;H$($PNI$$$N$G$O$J$$$G$7$g$&$+!#(B

-- 
Mamoru Yamanishi <yama@biotech.okayama-u.ac.jp>
+81-86-251-8196, +81-86-253-7399(GII type FAX)
Okayama Univ., Biotech. Dept.
